Sunday, 19 January 2014

Repair SQL Database undergoing corruption issues in GAM, GAM, and SGAM Pages

1 comment
MS SQL is the RDBMS and it is widely used throughout the world for reliable, consistent, and fast data managements for small and large organizations. MS SQL server uses .MDF file format to store data within its database. The SQL server database files are categorized into two types: Master Data File (.mdf) and Secondary Data File but only one Master Data File is responsible for each database as it keeps track of all the other files in the database. In SQL server, the fundamental unit of data storage is the page. The space allocation in SQL Server is managed in portions called “extents”

SQL Server uses three special types of pages to record extents: GAM, SGAM, and IAM.

GAM (Global Allocation Map) Pages: GAM pages record what extents have been allocated. Each GAM covers 64,000 extents, or almost 4 GB of data. The GAM has one bit for each extent in the interval it covers. If the bit is 1, the extent is free; if the bit is 0, the extent is allocated.

SGAM (Shared Allocation Map) Pages: SGAM pages record which extents are currently being used as mixed extents and also have at least one unused page. Like GAM, each SGAM also covers 64,000 extents, or almost 4 GB of data. The SGAM has one bit for each extent in the interval it covers. If the bit is 1, the extent is being used as a mixed extent and has a free page. If the bit is 0, the extent is not used as a mixed extent, or it is a mixed extent and all its pages are being used.

IAM (Index Allocation Map) Pages: The function of IAM pages is to track the extents that belong to tables or indexes. The IAM is a bitmap that refers extents to objects. This kind of page covers a 4-GB range and an IAM page is required for each 4-GB range of data, partition, and allocation unit type.

While working with MS SQL server, you may come across issues resulted due to corruption of SQL server pages: GAM, SGAM, and IAM. Now, you cannot perform your queries to get desired result. Suppose, you run a query on your Server in order to count the amount of rows present in one of the primary tables and get an unexpected error message as follows:

“Attempt to fetch logical page (1:42724) in database ‘test’ belongs to object ‘report-table’, not to object ‘RRR’.Connection Broken.”

To fix such errors, you try DBCC CHECKDB. This utility performs systematic data integrity checks throughout the data files and identifies infected areas. But, it is not enough to resolve all issues related to GAM, AGAM and IAM pages of SQL server. If you have backup copy then you can restore your database. Unfortunately, in absence of backup or having corrupted backup, you should look for a third party tool.

To resolve your critical situation of SQL server corruption (GAM, AGAM and IAM), Kernel for SQL database has been developed. With the help of this powerful SQL recovery tool, you can successfully fix all existing SQL server issues and recover your crucial database. It supports MS SQL Server 2000, 2005, 2008, 2008 r2 and 2012.
Visit this link to download Kernel for SQL Recovery Tool

1 comment:

  1. Thank you for the sharing this informative information, this information really very useful for the MS SQL services client. If you are facing corruption issues in your SQL Server database then you can use Kernel for SQL Recovery which can easily repair and recover the corrupted or damaged MDF file.