Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement database integrity checks

A worked example

Complete the statement

InventoryDB is hosted on SQL Server on an Azure virtual machine. It contains disk-based tables and a memory-optimized table named dbo.StockLevels. A weekly SQL Server Agent job runs DBCC CHECKDB against InventoryDB. During a database backup, the CHECKSUM validation of the memory-optimized filegroup reports a data integrity issue in dbo.StockLevels.

Complete the statement about InventoryDB.

The weekly DBCC CHECKDB job validates . To resolve the integrity issue in dbo.StockLevels, you must .

  • Blank 1: only the disk-based tables (correct answer)

    DBCC CHECKDB is supported on databases with memory-optimized tables, but it validates only the disk-based tables. It therefore does not validate only the memory-optimized tables, and it does not validate both types. Having a clustered index is not the condition that limits validation; the limit is disk-based versus memory-optimized.

  • Blank 2: restore InventoryDB from the last known good backup (correct answer)

    For memory-optimized tables, integrity issues must be fixed by restoring from the last known good backup. REPAIR_ALLOW_DATA_LOSS and REPAIR_REBUILD are DBCC repair options, and DBCC repair options aren't available for memory-optimized tables. Rebuilding indexes is index maintenance and does not repair corrupt data.

Why

In a database that contains memory-optimized tables, DBCC CHECKDB validates only the disk-based tables. Memory-optimized filegroups get CHECKSUM validation during backup and recovery instead. DBCC repair options can't be used on memory-optimized tables. A corrupt memory-optimized table must therefore be recovered by restoring the last known good backup, which is why regular, tested backups matter.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free