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.

I have SQL Server 2008 R2 database, which is corrupted. Dbcc checkdb command gives result:

Msg 8921, Level 16, State 1, Line 1
Check terminated. A failure was detected while collecting facts.
Possibly tempdb out of space or a system table is inconsistent. Check previous errors.

Then I tried run dbcc checktable, with this command:

sp_MSforeachtable @command1="print '?' dbcc checktable ('?')"

Result of this command is:

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

Then I reviewed System Views and found, that some System Views are corrupted, in example when I do

select * from [sys].[all_parameters] 

or from [sys].[all_columns] I got some result rows and then I got this error:

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

Is there any ways to repair that System Views?

P.S. I already tried to do repair with data loss but it was unsuccessful...

share|improve this question

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

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

1 Answer 1

up vote 2 down vote accepted

AFAIK, your best bet is to copy all the tables to another database. If you're using SQL Server express, this is something you have to do by hand, using SQL Queries or scripts.

It's a good idea to check for possible causes too: run a memory diagnostic, and a disk check.

share|improve this answer

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.