2

We have an extensive database of tables. I moved over a table from our dev db to our production db using a program called SQL Compare. I just copy paste the SQL it produces into Management Studio and execute it there. Then when I tried to select from the table, it would just keep executing. It is an extremely simple table: two columns, both int, no rows at the moment. We were also unable to delete the table.

We suspect there is some type of corruption, but when we run error checking on tables or database it says there are no problems. I've included our version below, just a SQL Server 2008 R2 Express version. The only errors we get are when we run dbcc checkdb. But it only shows an error on the last line. It shows no errors on any individual tables.

We restarted the SQL Server and then we were able to delete the table. We can select from every table, and everything is now working normal. But we still have that error at the end of checkdb.

Not sure what to do, it's a little weird. Everything is working, but we are a little afraid something might happen. We have backups and everything, just trying to fix this if at all possible.

Last lines of checkdb:

CHECKDB found 0 allocation errors and 0 consistency errors in database '....'.

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

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

When we run checkdb on another db:

CHECKDB found 0 allocation errors and 0 consistency errors in database '....' .

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Our SQL Server database version:

Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (Intel X86)   
Jun 17 2011 00:57:23   
Copyright (c) Microsoft Corporation  
Express Edition with Advanced Services on Windows NT 6.0 <X86> (Build 6002: Service Pack 2) (Hypervisor) 

migrated from stackoverflow.com Nov 13 '15 at 17:53

This question came from our site for professional and enthusiast programmers.

  • Did you check sql server error log and windows event logs to see if there is anything logged there ? Also try running DBCC CheckDB ('yourDBName') WITH NO_INFOMSGS, ALL_ERRORMSGS from a new connection of SSMS or sqlcmd. – Kin Shah Nov 13 '15 at 18:16
  • Have you checked the SQL Server errorlog for more verbose detail of the error? Have you checked the Server Event Viewer logs for any disk errors, etc.? – Pimp Juice IT Nov 13 '15 at 18:16
  • This might point to a serious problem with the DB. See if you can find any dumps in the error log. Also check the Log folder for the SQL Server instance. Also, look at your Windows event logs to see if there are reports of hardware errors. – SQLmojoe Nov 13 '15 at 18:33
1

This might help someone with a similar problem. There was nothing wrong with the database, we needed to install an update. A service pack I believe. Then everything was fine.

0

This certainly is not universally a solution to issues like this, but I was actually running into these errors on 2008R2 as well this last week.

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

I DBCC checkdb with repair options would sometimes not have a severe error, but would flag some index values as invalid and would "repair" them.

In my case, the ultimate cause was a bad RAM module, which was occasionally corrupting the in-memory snapshot of the database, resulting in erroneous complaints about my indexes. Other, more recently built, indicies were likely corrupt because they had been built in the presence of the bad RAM.

I'd love to tell you that everything worked out in the end, but that result is still pending: the server is offline this weekend as we await a new RAM module, as well as a disk replacement for our RAID6 array.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.