Wednesday, April 28, 2010

Recovering Error 2575 in SQL Server 2008

A page is the most basic unit of storage in SQL Server. The memory space allotted to a database file is divided into pages having contiguous address location. And these pages are, in turn, stored in extents, which are a collection of eight contiguous pages. The role of the extents is to effectively manage the pages. An Index Allocation Map (IAM) is a page type that stores the details about the extents used by a table per allocation unit. These are also used by SQL Server to traverse through a heap to locate the available space for new rows. However, sometimes these IAM pages do not function properly because of corrupted databases. A database can become corrupt because of virus infections, human errors, faulty hardware, power outages, etc. In such cases, you should consider taking appropriate measures to recover the database. However, if you are not able to repair the database then you should use a third-party application for MS SQL Recovery.

Consider a scenario wherein you receive the following error message when you try to mount your SQL Server 2008 database.

“IAM page P_ID1 is pointed to by the next pointer of IAM page P_ID2 in object ID O_ID, index ID I_ID, partition ID PN_ID, alloc unit ID A_ID (type TYPE) but was not detected in the scan.”

The error message states that the IAM page was found for the current index but it was not found for the next-page pointer.

Cause:
There could be two possible reasons for the aforementioned error message, either the reference of the metadata file missing or the header of the IAM page is corrupt. Because of this, the database has gone corrupt.

Resolution:
To resolve the issue, you can perform the following measures:
Look for hardware failures: Do check if this error is because of faulty hardware. Run hardware diagnostics and check the error logs and rectify the hardware-related errors, if any. You should also look to swap different hardware components if the database is getting corrupt frequently. Also, you can also contemplate using a new hardware system. However, this would mean formatting the hard disk and reinstalling the operating system, which is not required as it would erase the database as well.
Replace the corrupted database with a clean backup.
Run DBCC CHECKDB command without a repair clause to check the extent of the corruption. Then, run it again with the appropriate repair clause after determining it.

However, if you are still not able to repair the corrupted database then you should use a third-party SQL Server recovery application to recover SQL database. Such read-only tools perform SQL Recovery using fast yet sophisticated scanning algorithms without overwriting the damaged area.

SQL Recovery software is a robust tool that enables you to execute SQL recovery on corrupted SQL database components such as tables, defaults, stored procedures, triggers, views, and rules. It is also able to repair the database constraints such as primary key, foreign key, unique key, and check. The MS SQL recovery utility recovers corrupted databases that were originally created in MS SQL Server 2000, 2005, and 2008. The software is compatible with Windows 7, Vista, Server 2003, XP, and 2000.

No comments:

Post a Comment