Monday, March 26, 2012
Error Installing RS with exising DB
Business Server 2000 box that already contains the ReportServer DB from a
previous setup where the Web portion of RS resided on another box.
The error is:
"A database with the specified name (ReportServer) already exists and is not
a valid report server database. You must either remote the existing database
or select a new database name."
What may be wrong?
Tx
AndyRS won't allow you to install onto a DB that already exists locally. If the
RS that used this database is not needed anymore, then just delete it (and
the temp database associated with it), then you can install. Or you can just
select a new name for the database when running setup.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andy Schmidt" <andys@.minunteclinic.com> wrote in message
news:ub2%23zNz$EHA.1296@.TK2MSFTNGP10.phx.gbl...
>I am getting the following error while attempting to install RS on a Small
> Business Server 2000 box that already contains the ReportServer DB from a
> previous setup where the Web portion of RS resided on another box.
> The error is:
> "A database with the specified name (ReportServer) already exists and is
> not
> a valid report server database. You must either remote the existing
> database
> or select a new database name."
> What may be wrong?
> Tx
> Andy
>|||Daniel,
I don't want to re-create all of the folder structure, permissions, etc. If
I create a new db is there a way to import from the old db's tables?
Tx
Andy
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:#6$JXoAAFHA.204@.TK2MSFTNGP10.phx.gbl...
> RS won't allow you to install onto a DB that already exists locally. If
the
> RS that used this database is not needed anymore, then just delete it (and
> the temp database associated with it), then you can install. Or you can
just
> select a new name for the database when running setup.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Andy Schmidt" <andys@.minunteclinic.com> wrote in message
> news:ub2%23zNz$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> >I am getting the following error while attempting to install RS on a
Small
> > Business Server 2000 box that already contains the ReportServer DB from
a
> > previous setup where the Web portion of RS resided on another box.
> >
> > The error is:
> >
> > "A database with the specified name (ReportServer) already exists and is
> > not
> > a valid report server database. You must either remote the existing
> > database
> > or select a new database name."
> >
> > What may be wrong?
> >
> > Tx
> > Andy
> >
> >
>|||You can use rsconfig to point to the old database after you install to a new
database. Just make sure that both db schemas are the same. That is if the
original DB is SP1 make sure to upgrade the new one to SP1 before using
rsconfig. You will most likely then have issues with reading encrypted
data. If you saved off your symmetric key from the old installation, after
using rsconfig you can import the key using rskeymgmt. If you did not save
the old symmetric key, after running rsconfig, run rskeymgmt -d. This will
delete all encrypted data from RS. That means you will need to enter all
your report/data source credential again.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andy Schmidt" <andys@.minunteclinic.com> wrote in message
news:Ohy1KViAFHA.2316@.TK2MSFTNGP15.phx.gbl...
> Daniel,
> I don't want to re-create all of the folder structure, permissions, etc.
> If
> I create a new db is there a way to import from the old db's tables?
> Tx
> Andy
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:#6$JXoAAFHA.204@.TK2MSFTNGP10.phx.gbl...
>> RS won't allow you to install onto a DB that already exists locally. If
> the
>> RS that used this database is not needed anymore, then just delete it
>> (and
>> the temp database associated with it), then you can install. Or you can
> just
>> select a new name for the database when running setup.
>> --
>> -Daniel
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>> "Andy Schmidt" <andys@.minunteclinic.com> wrote in message
>> news:ub2%23zNz$EHA.1296@.TK2MSFTNGP10.phx.gbl...
>> >I am getting the following error while attempting to install RS on a
> Small
>> > Business Server 2000 box that already contains the ReportServer DB from
> a
>> > previous setup where the Web portion of RS resided on another box.
>> >
>> > The error is:
>> >
>> > "A database with the specified name (ReportServer) already exists and
>> > is
>> > not
>> > a valid report server database. You must either remote the existing
>> > database
>> > or select a new database name."
>> >
>> > What may be wrong?
>> >
>> > Tx
>> > Andy
>> >
>> >
>>
>sql
Sunday, March 11, 2012
Error in paramterized query - Execute SQL Task
Hi,
I am having some difficulties with a Execute SQL Task, I'll try to describe:
The task contains 2 queries:
UPDATE config SET last_timestamp_int=this_timestamp_int, this_timestamp_int=CAST(GETDATE() AS INT) WHERE company_id=?
SELECT last_timestamp_int AS last_timestamp_int, this_timestamp_int AS this_timestamp_int FROM config WHERE company_id=?
The ? reference to a variable set in Parameter Mapping, which has a initial string value set. Direction set to "Input", Datatype set to "varchar", and parametername to "0". The connectiontype is OLE DB. I have tried to set BypassPrepare to true, but that doesnt help.
The second query fetch 2 values which is stored in the task's Result Set, in two variables. Resultset is set to single row.
When I press Parse Query, I get an error:
"The query failed to parse. Parameter Information cannot be derived from SQL statements. Set parameter information before preparing command."
When I try to run the package, I get this error:
SSIS package "Package.dtsx" starting.
Error: 0xC002F210 at Store last timestamp in variable, Execute SQL Task: Executing the query "UPDATE config SET last_timestamp_int=this_timestamp_int, this_timestamp_int=CAST(GETDATE() AS INT) WHERE company_id=?
SELECT last_timestamp_int AS last_timestamp_int, this_timestamp_int AS this_timestamp_int FROM config WHERE company_id=?" failed with the following error: "No value given for one or more required parameters.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Store last timestamp in variable
Warning: 0x80019002 at Define global variables: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
Can someone please help me identify, what it is I am doing wrong?
Thanks in advance
Your setup looks correct to me, so I have two suggestions for troubleshooting this.
1. Break up the task into two separate tasks, one for the update and a second for the select.
2. Run profiler to see the value and result of your queries when they run.
I don't think there's any issue with the parsing. My understanding is that the parser doesn't know what to do with the ? variable so it always returns an error even if it's a valid working query.
|||Use two parameters, one for the UPDATE and one for the SELECT (even though the values of the parameters are the same)Friday, February 24, 2012
Error in Calling Stored Procedure
I want to call a stored procedure in ASP.Net 2.0. I've already made sure that the SP contains no error by the Query Analyzer.
However, when I try to run this in the ASP.Net application, error occured.
This error message is {"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."}
Calling the SP via a Class
1Public Function ExecuteStoredProcedure(ByVal NameAs String,ByVal Para()As String,ByVal Value()As String)2If Para.Length <> Value.LengthThen Exit Function3 SqlCmd =New SqlCommand4 SqlCmd.Connection = SqlConn5 SqlCmd.CommandText = Name6 SqlCmd.CommandType = CommandType.StoredProcedure7For iAs Integer = 0To Para.Length - 18'SqlCmd.Parameters.AddWithValue(Para(i), Value(i))9Dim pAs New SqlParameter(Para(i), SqlDbType.NVarChar)10 p.Direction = ParameterDirection.Input11 p.Value = Value(i)12 SqlCmd.Parameters.Add(p)13Next14 SqlCmd.ExecuteNonQuery()15End Function
The Code behind file
1Protected Sub btnSubmit_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles btnSubmit.Click2If txtFromDate.Text =""OrElse txtToDate.Text =""Then3 trMsg.Visible =True4 Exit Sub5 End If67 Dim tsAs New Thread(AddressOf GenerateReport)8 ts.Start()910 MultiView1.ActiveViewIndex = 111 lblConfirmationMessage.Text ="Report generating in progress." & vbNewLine &"You can continue using other functions."12End Sub1314 Protected Sub GenerateReport()15Dim userNameAs String =CType(Session("User"), clsUser).UserName16Dim fromAs String = txtFromDate.Text1718Dim connAs New clsConnector19 conn.OpenConnection()20'conn.Insert("EXEC gen_report '" + txtReportName.Text + "','" + txtDescription.Text + "','" + userName + "','" + txtFromDate.Text + "','" + txtToDate.Text + "';")21 conn.ExecuteStoredProcedure("gen_report", _22New String() {"@.name","@.remark","@.by","@.fromdate","@.todate"}, _23New String() {txtReportName.Text, txtDescription.Text, userName, txtFromDate.Text, txtToDate.Text})24 conn.CloseConnection()25End Sub26
Thanks!
Are u saving Date as string into a column with data type smalldatetime. In your code it seams that you r passing date value . Can u check this one.
|||try to set timeout to bigger value
SqlCmd =New SqlCommand
4 SqlCmd.Connection = SqlConn
5 SqlCmd.CommandText = Name
sqlcmd.CommandTimeout=300
and maybe it will help, how long it take to create results for this procedure in Query analyzer? your timeout should be a little longer than this time.
|||The data type is "datetime".
And I use the Now.ToString("yyyy-MM-dd HH:mm:ss") for passing the value.
|||So definitely it won't work. Try to pass it as a date object into the database. Moreover if your conversion of date in different format other than the one defined in db wil create error even if you pass data as dateobject. So try to pass data into DB in the relevent datatype itself|||Actually, all the input parameter in the SP is nvarchar, but in different size. So, I use String in the code-behind file.
I also tried to set the connection timeout to 300, but the error message is still the same as the original one.
|||did you tried to run the sp directly in query analyzer by passing the parameters you are passing from UI?
thanks,
satish.
|||I've just tried to run the SP in the query analyzer and in the UI using the same set of parameters. It works in the query analyzer but not in the UI.
Also, the error is not due to the Thread. Because I tried to run the GenerateReport() without using the Thread and the same error occured.
One more point to mentioned is that I've set the timeout period to 300 seconds in the connection string, however, the UI show me that error message within 1 minute. Is that really timeout?
Thanks
|||Hello,
Most likely, the Sql Connection problem to me.
Have you tried to debug step by step?
I don't feel good with this line on your function:
SqlCmd.Connection = SqlConn
Why don't you get the all the code from other class into your calling page, and debug it?
Just opinion!
|||here i write some sample of stored procedure
i think this will help u
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("Project1connectionString").ToString())
con.Open()
Dim DA As New SqlDataAdapter("select acceptqty,itemid from grndetail where grnid='" & Trim(ggrnid) & "'", con)
Dim ds As New DataSet
DA.Fill(ds)
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1 Step 1
Dim cmd1 As New SqlCommand
cmd1.CommandText = "aaceptqtygrn"//name of stored procedure
cmd1.CommandType = CommandType.StoredProcedure
cmd1.Connection = con
cmd1.Parameters.AddWithValue("@.itemId", ds.Tables(0).Rows(i).Item("itemid"))
cmd1.Parameters.AddWithValue("@.acceptqty", ds.Tables(0).Rows(i).Item("acceptqty"))
cmd1.ExecuteNonQuery()
Next
con.Close()
Hi yipych,
I have tried your code and its working for me. I think its the problem with your connection string or some other connection related issues. I have placed the sample code here.
http://www.igold.in/forum/samples/WebVb100.zip
Let me know if it helps you
Friday, February 17, 2012
Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
Thanks
Hi Rob
"Rob Dob" wrote:
> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John
Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:
> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't have
enough space available.
John
Error Importing CVS into SQL Server 2005 using SQLBulkCopy and c#
I'm using SQLBulkCopy via c#, I'm importing a large text file into a
destination SQL Table, the file contains multiple columns and is about 100k
records, I am getting the following error:
'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
filegroup is full. Create disk space be deleting unneeded files, dropping
objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on the existing files in the filegroup.
Can someone please tell me how to resolve this?
ThanksHi Rob
"Rob Dob" wrote:
> Hi,
>
> I'm using SQLBulkCopy via c#, I'm importing a large text file into a
> destination SQL Table, the file contains multiple columns and is about 100
k
> records, I am getting the following error:
>
> 'Could not allocate space for object 'dbo.list0001'.PK_List001Table' in
> database 'E3232323\43343434_\34343\MyDatabase.mdf because the 'PRIMARY'
> filegroup is full. Create disk space be deleting unneeded files, dropping
> objects in the filegroup, adding additional files to the filegroup, or
> setting autogrowth on the existing files in the filegroup.
>
> Can someone please tell me how to resolve this?
> Thanks
The error message is probably correct! You have either a fixed file size for
the database file, or there is not enough disc space for the file to grow by
the expected value. This may be because you have a percentage growth set and
it is therefore trying to expand by an enormous amount or you just don't hav
e
enough space available.
John
Wednesday, February 15, 2012
Error Handling problem
The SP contains the following test code:
try {
int.Parse("");
}
catch (Exception ex) {
try {
command.CommandText = "raiserror (100003, 16, 1, 'parse error') with seterror";
pipe.ExecuteAndSend(command);
}
catch {
return;
}
}
Here the SQL I use to test it
decare @.e int
begin try
exec MySP
set @.e = @.@.error
print @.e
print 'phew!'
end try
begin catch
print error_message()
end catch
print 'done'
What I expect is that, since MySP throws an error, the catch block is executed and the error message is printed out.
What happens is that
@.@.error contains the correct error code 100003
the catch block does not executes
Here the output of SSMS:
Msg 100003, Level 16, State 1, Line 1
"invalid operation: parse error"
100003
phew!
done
Any Idea of why @.@.error is set but the catch block does not executes ?
just a final note: if do not use the try/catch block in the SP and let the exception be caught into the server engine, the catch block on the T-SQL is correctly executed (and it is my current solution, sigh !!!)Hi,
see this connect bug here: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=251376
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||Thanks from providing the link.
I'm skeptical they will fix it less time than a couple of years.