Thursday, January 7, 2010

Fixing “Database error...” post SQL Database Corruption

PFS (Page Free Space) pages in SQL Server database not only maintains free spaces, but a lot more than that. Every SQL database file is divided into various PFS intervals, each containing 8088 pages. A PFS page contains a byte-map, which stores one byte for every page included in the PFS interval. Corruption in PFS page results into damage in the stored bytes, further resulting in making your database unmountable. The database records saved in the database become inaccessible after it becomes unmountable. For easy accessibility of records and to save your valuable time, you will need to restore the data from a valid backup. However, in case of backup unavailability or corruption, you will need to use a third-party MS SQL Recovery tool, which provides systematic repair.

As a practical example, you receive the below error message while mounting your SQL database:

“Database error: Page P_ID1 is marked with the wrong type in PFS page P_ID2. PFS status 0xVAL1 expected 0xVAL2.”

The appearance of the above error message makes your database unmountable, further resulting into inaccessibility of its stored records.


The above error message appears when the below bits are improperly set:
PFS_IS_IAM_PG (0x10)

Damage in PFS pages can occur either due to logical or physical reasons.


To read your database records and to resolve the error message, you will need to follow the below measures:
If the above error arises due to physical damages, then you need to swap the damaged system component with a new component.
However, if the message arises due to logical corruption, then you will need to run DBCC CHECKDB, with appropriate repair clause.

While the first resolution provides 100% guarantee to resolve all physical damages, the second falls short to prove successful in all logical corruption scenarios. For such cases, only a third-party SQL Repair application should be used. These SQL Repair utilities systematically scans a logically corrupted database and restores it on default or new destination. Such repair software are self-explanatory and can be easily used by even non-technical users.

You can view this related sql article :-

No comments:

Post a Comment