Tracking Modified Extents

SQL Server Architecture

SQL Server Architecture

Tracking Modified Extents

SQL Server 2000 introduces two new internal data structures to track extents modified by bulk copy operations or modified since the last full backup. These new data structures greatly speed differential backups and logging bulk copy operations when a database is using the bulk-logged recovery model. Like the Global Allocation Map (GAM) and Secondary Global Allocation Map (SGAM) pages, these new structures are bitmaps where each bit represents a single extent.

  • Differential Changed Map (DCM)

    Tracks the extents that have changed since the last BACKUP DATABASE statement. If the bit for an extent is 1, the extent has been modified since the last BACKUP DATABASE statement. If the bit is 0, the extent has not been modified.

    Differential backups can now read just the DCM pages to find out which extents have been modified. This greatly reduces the number of pages that a differential backup must scan. The length of time a differential backup runs is now proportional to the number of extents modified since the last BACKUP DATABASE statement, not the overall size of the database.

  • Bulk Changed Map (BCM)

    Tracks the extents that have been modified by bulk logged operations since the last BACKUP LOG statement. If the bit for an extent is 1, the extent has been modified by a bulk logged operation after the last BACKUP LOG statement. If the bit is 0, the extent has not been modified by bulk logged operations.

    BCM pages are only relevant when the database is using the bulk-logged recovery model. In this recovery model, when a BACKUP LOG is performed, the backup process scans the BCMs for extents that have been modified and includes those extents in the log backup. This allows the bulk logged operations to be recovered if the database is restored from a database backup and a sequence of transaction log backups. BCM pages are not relevant in a database is using the simple recovery model because no bulk logged operations are logged. They are not relevant in a database using the full recovery model because that recovery model treats bulk logged operations as fully logged operations.

The interval between DCM pages and BCM pages is the same as the interval between GAM and SGAM pages; 64,000 extents. The DCM and BCM pages are located behind the GAM and SGAM pages in a physical file:

See Also

Managing Extent Allocations and Free Space