Wednesday, August 5, 2009

SQL Server Page Header Corruption and Error 8939

SQL Server database storage space is divided into pages, which are numbered sequentially. When you perform any operation, these pages serve as the basic I/O unit. Each of these pages is marked with a corresponding header (96-byte in size) that conveys information like page number, free space available, page type, object ID etc. If you run DBCC CHECKDB on database and it reports errors on database pages, the odds are that the page header is damaged. This leads to data inaccessibility and to restore lost information, you require using your recent data backup. However, if backup is damaged, not updated, or not available, you need to use SQL recovery tools for safe repair and restoration.

Consider a practical instance, you run DBCC CHECKDB on your SQL Server database and get a series of error messages, similar to:

Msg 8939, Level 16, State 98, Line 1
Table error: Object ID O_ID, index ID I_ID, partition PA_ID, alloc unit ID AU_ID, page P_ID, Test (TEST) failed. Values are VAL1 and VAL2.

Cause

Error 8939 arises due to corruption in page header. One of the possible causes is hardware errors. The test that failed is defined in TEST string, while VAL1 and VAL2 are dependent upon error state.

Solution

To correct the above error, you need to follow these steps:

You require examining system and application logs for hardware failures. Replace the affected hardware components. Also, you need to ensure that no write caching is enabled on disk controller (this is the issue when data corruption is observed frequently)
Use your recent data backup to restore lost data.
In case of valid backup unavailability, run DBCC CHECKDB command to determine corruption state and repair clause to be used. Next, you need to run DBCC CHECKDB with recommended repair clause. Note: This process results into data loss as the affected pages will be deleted.
For safe SQL Repair, use commercial repair applications. SQL Recovery software are read-only, advanced, and automated software that scan damaged databases and restore them with original content and view.

Stellar Phoenix SQL Recovery is a comprehensive repair tool for damaged SQL Server databases. It supports SQL Server 2000 and 2005. This SQL Repair software is available with self-descriptive interface and restores all database objects (tables, user defined data types and functions, triggers, stored procedures, views, rules etc.). The software is compatible with Windows Vista, XP, 2003, 2000, and NT.

No comments:

Post a Comment