Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Nasty error with Standby/Read Only Database

Author  Topic 

vijayinchicago
Starting Member

3 Posts

Posted - 2006-11-30 : 16:32:52
I have a very long view that takes a long time to run (meant for Analysis Server) but always works in a current transactional database. However, when I restore the database over into Standby / Read Only mode to allow for Log Shipping from the primary database and run the same query, I get the following error:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

In both cases of the regular db as well as standby db, I am executing the same query

Select * FROM <view_name>

in SQL Server Management Studio. The db is SQL Server 2005. Any ideas?

Thanks

Kristen
Test

22859 Posts

Posted - 2006-11-30 : 16:49:10
I got lots of useful suggestions when I Googled that message. I suggest you try that first.

Kristen
Go to Top of Page

vijayinchicago
Starting Member

3 Posts

Posted - 2006-11-30 : 16:59:41
I've looked up everything on Google. I understand there are several situations where this can happen. My question is based more on the Standby database. The view runs just fine against a regular transactional database but shows the error on the Standby database. This is the part where I can't find answers.
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-11-30 : 17:00:52
You're going to need to do some good ole fasion trouble shooting.

It's impossible to say why you're getting that error without seeing any code. I suggest several things. Maybe these attempts will lead you to where the problem is.

try running the statement that creates the view just as a select statement.

try breaking the view definition into more basic components (as select statements not create view statements) Maybe you can isolate a corrupt table problem code.

try temporarily setting the database back to a normal state

try selecting from a simple view.

Be One with the Optimizer
TG
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-30 : 17:07:59
"I've looked up everything on Google"

So do you have the hot fixes installed that Microsoft knowledge-base refers to?
Go to Top of Page

vijayinchicago
Starting Member

3 Posts

Posted - 2006-11-30 : 17:24:31
Yes, I suppose you are referring to:

http://support.microsoft.com/kb/872939/en-us

My question, once again - this works fine on a transactional database (on the same server) but errors on a standby database.

So my question revolves more around why the difference when both of them are restored from the same backup file.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-12-01 : 00:35:40
This one caught my eye, but there are several others:

http://support.microsoft.com/kb/910416

There are no other differences between the servers? Same version/patches, same or similar configuration (location of files, performance of disks, number of CPUs, amount of RAM etc)?

If you restore to the original server as STANDBY can you reproduce the problem there too? (or conversely restore to the Target server without Standby, so that the problem is isolated to Standby)

Kristen
Go to Top of Page
   

- Advertisement -