Thursday, March 4, 2010

Tips to resolve “Extent E_ID in database ID DB_ID...”

GAM (Global Allocation Map), SGAM (Shared Global Allocation Map), and IAM (Index Allocation Map) pages are three very important building blocks of SQL Server metadata structure. A GAM page contains one bit for each extent, where each bit states if the extent is already allocated or is available for allocation. Similarly, SGAM page too consists of one bit for every extent, which states whether the extent is mixed or dedicated, and contains one or more allocated pages. An IAM page again has one bit per dedicated extent, which is assigned to the index for which the IAM is a part. A systematic combination of these bits assures that the database is perfectly fine and is in usable state. However, the combination becomes damaged in case the database gets logically or physically corrupted. To overcome such situations, the user needs to opt for SQL Database Recovery solutions.

Below is the error message explaining the above scenario:

“Extent E_ID in database ID DB_ID is marked allocated in the GAM, but no SGAM or IAM has allocated it.”

After the above error message pops up, the database records become inaccessible. The above error message occurs due to following reasons:

When the extent is dedicated and also mixed.
When the extent is dedicated and also unallocated.
When the extent is mixed and also unallocated.
When the extent is dedicated, mixed, and also unallocated.


To resolve the above error message and to access database records, user will need to perform below actions:

Check for physical corruption of database by viewing application logs, SQL Server log, and system logs. To fix any hardware-related issue, the user will need to change the damaged system component.
Restore the data from an updated backup.

Check for logical corruption in database by executing DBCC CHECKDB command. This will enable the user to determine the exact extent of corruption. To fix the logical corruption, the user will need to run the same command with a repair clause. If the logical corruption persists, then s/he needs to take help of advanced SQL Database Repair application. A SQL Recovery tool employs effective repairing techniques to resolve all logical corrupted databases.

SQL Recovery repairs and restores MS SQL Server 2008, 20005, and 2000 databases, post any logical corruption scenario. The read only SQL Repair utility is safe-to-use as it does not modify the original database while repairing. It supports Windows 7, Vista, 2008, XP, 2003, and 2000 operating systems.

Article Source :-

No comments:

Post a Comment