You must have faced few error messages when you work on an MS SQL Server 2008 database. Barring few incidents, most of the times these cases occur because of corruption in the MDF (Master Database File) file. The reasons behind database corruption could either be virus infections, power outages, abrupt or improper shutdowns, etc. As a corrective measure, you should try in-house methods to recover SQL database. If nothing succeeds, then you should use a third-party SQL database recovery software to do the needful.
For example, you face the following error message while working on a corrupted MS SQL Server 2008 database:
“
Chain sequence numbers out of order in the Index Allocation Map (IAM) chain for object ID O_ID, index ID I_ID, partition ID PN_ID, alloc unit ID A_ID (type TYPE). Page P_ID1 with sequence number SEQUENCE1 points to page P_ID2 with sequence number SEQUENCE2.”
Cause:
Such problem could have appeared because of corruption in the IAM page.
Every IAM page is allotted a sequence number, which signifies the position of the IAM page. According to the rule, the sequence numbers by one for the IAM pages. However, the sequence number for P_ID2 IAM page does not follow this rule, which is causing this problem.
Resolution:
To counter such corruption problem, you should perform the following methods, preferably in the given order:
Overcome hardware problems: To start off, you should check the hardware components to check whether there is any fault with them. Run hardware diagnostics and check the error logs to assure this. Also, you can also reformat the hard disks and reinstall the operating system to remove any doubts related with the hardware.
Restore from backup: If the hardware is not faulty, then you should check the backup of the database. If it is clean and updated, then restore the database with the backup.
Run DBCC CHECKDB: If the backup is not updated, then you should run the DBCC CHECKDB command without the repair clause to know the extent of corruption. Then, run it again with the recommended repair clause. This tool will rebuild the IAM chain, and the pages that cannot be repaired will be deallocated.
As you may have noticed in the aforementioned methods, complete or safe
MDF file recovery may not be possible. For such cases, you should use a third-party master database file recovery software to recover SQL database. Performing SQL recovery using these tools ensure safe and easy MDF recovery as these tools use sophisticated scanning algorithms.
One such tool is Stellar Phoenix SQL Data Recovery that recovers corrupted MDF files created in MS SQL Server 7.0, 2000, 2005, and 2008. Compatible with Windows 7, Server 2008, Vista, Server 2003, XP, and 2000, this MS SQL Server recovery software recovers various database objects such as tables, NDF files, collations, stored procedures, defaults, triggers, etc.