Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We have a database Ms

DBCC CHECKDB (MS)

Or

ALTER DATABASE MS SET SINGLE_USER
DBCC CHECKDB(MS,REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE MS SET MULTI_USER

Error message

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.

After spending hours and testing each table, the problematic table was found "LC"

DBCC CHECKTABLE(LC)

Error Message

Msg 211, Level 23, State 51, Line 1
Possible schema corruption. Run DBCC CHECKCATALOG.

Now,

DBCC CHECKCATALOG

Message

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

I also tried to have a look on indexes

SELECT * FROM sysindexes

Error Message

Msg 211, Level 23, State 51, Line 1
Possible schema corruption. Run DBCC CHECKCATALOG.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

Again,

SELECT * FROM LC 

Or

DROP TABLE LC

Error Message

Msg 211, Level 23, State 51, Line 1
Possible schema corruption. Run DBCC CHECKCATALOG.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

I would not mind data loss for that particular table, I want to have the table dropped. Any ideas, please help!

share|improve this question

migrated from stackoverflow.com Jan 21 '12 at 23:29

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

add comment

2 Answers

up vote 4 down vote accepted

Restore. Or you could RESTORE.

Oh, and never use REPAIR_ALLOW_DATA_LOSS (the article is worth reading)

Seriously: no amount of DBCC voodoo will bring your database back to a pristine, working state.

share|improve this answer
add comment

The most likely cause for these types of errors is a faulty disk drive. Before you continue troubleshooting, test the hard disk with hdtune or chkdsk /R. I'd also advise a memory test (there's a built in one called Windows Memory Diagnostic.)

Once you're sure the machine is OK, you could copy all good tables to a new database. Then you can drop the old database.

share|improve this answer
    
The database is copied from the faulty system to a laptop. The database is not shown on "Copy Database Wizard" or "Generate Scripts", therefore we would have to migrate data individually. I would like to drop the table to save time, to give it a try. Any ideas? –  Nick Binnet Oct 3 '10 at 14:41
    
@Nick Binnet: I don't think it's possible to repair that kind of damage (like GBN says, no amount of voodoo.) The best I can think of is salvaging what you can to a new database. –  Andomar Oct 3 '10 at 16:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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