Friday, August 24, 2012

Resolving SQL Server Error 5242 and Repairing Corruption in SQL Databases


SQL Server 2000 users are frequently confronted with various types of assertion failures and run across one of the following errors on their screen:


'SQL Server Assertion: File: , line=1378 Failed Assertion = 'm_offBeginVar < m_sizeRec'.'

These asserts are again the source of trouble for SQL Server 2005 users and take one of the forms as shown below:


'Msg 5242, Level 22, State 1, Line 1
An inconsistency was detected during an internal operation in database 'MyCorruptDatabase'(ID:12) on page (1:34923). Please contact technical support. Reference number 4. '

Another error that manifests itself in a similar way is Error 5243. The above two errors relate to the case when the offset of the variable length column offset array exceeds the value of offset for the last field of the record. These errors could be triggered as a result of maintenance jobs or by running DBCC CHECKDB. The DBCC CHECKDB command-line utility generally examines all the allocated pages in your SQL database. During the process, it may come across a corrupt database page. When trying to read this page, it might fail. Normal database queries will usually discard bad or corrupt pages. Further, if you have maintenance jobs running in your database, they will rebuild the indexes and de-allocate corrupt pages from the database. So, you won’t find any messages indicating corruption in your database.

The errors 5242 and 5243 may not be received, if you have enabled torn-page detection or page checksums for your database. Instead, you may get another error 824 by the buffer pool at the time of page read. This will happen before the processing of corrupt page by the record-cracking code that would have caused the 5252 and 5243 errors. Typically, these errors denote corruption in your data structures. You may get some useful information by seeing the reference numbers at the end of the error messages. This problem is encountered when you have some issue with the I/O subsystem.

In order to recover from this type of corruption and retrieve your inaccessible table data, you can use professional mdf repair tool. These software run an advanced scan against the corrupt file to recover all your lost or damaged database objects, including tables, table properties, indexes, views, triggers, etc. In addition, they support all the latest versions of SQL Server, including MS SQL Server 2012, 2008 R2, 2008, 2005, 2000, and 7.0.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...