Friday, August 17, 2012

How to fix possible schema corruption in SQL Server Database

Possible Schema Corruption Problem typically is pretty rare with SQL Server database. On this error, where you do have an issue, though, look for an error message on the SQL error log for some clues as to how to fix the problem.
PROBLEM: Possible schema corruption error message occurs, when I was trying to update some tables!!
ERROR: 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.

PLATFORM: Error can occurs in any SQL server version such as SQL Server 2005, 2008, 2008 R2 etc..

ABSTRACT: Possible schema corruption error can be repairable by restoring from good backup.

REFERENCE LINKS: Sqlteam Sqlservercentral

First Recommended Step:
DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS
Check if it returns any consistency errors!!
DISCUSSION: The error can be occurs in any version of SQL Server. It looks like that some table in your database has got corrupted. In this case, DBCC CHECKDB is unable to repair this as it is not able to execute completely due to this error.
IMPACT: Due to this error. May be you are unable to open other SQL Server tables.
SOLUTIONS:
  • Restore from good backup would be the best solution to resolve this error.
  • If you have transaction log backups, take a tail-log backup then restore the latest full backup, all the transaction logs, ending with the tail-log backup that you took just before starting the restore. There should be 0 data loss in that situation.
  • If you do not have transaction log backups, then create a new database and try to import much data as possible or if you can identify the culprit table, probably you try dropping & recreating that particular table.
This way you can solve your SQL Server possible schema corruption error message. All the best!
Enhanced by Zemanta

No comments:

Post a Comment