RESTORE VERIFYONLY vs. Full Restore with DBCC CHECKDB for Data Integrity
0 reputation · 01 Jun 2020, 06:34 UTC
Verification Strategy for Large Database Backups
Ensuring the recoverability of a Microsoft SQL Server database requires balancing verification depth against available resources. Two documented methods provide different levels of assurance: RESTORE VERIFYONLY and a full RESTORE followed by DBCC CHECKDB.
RESTORE VERIFYONLY confirms that the backup set is complete and readable, validating the header and checksums without writing data to disk. However, it cannot detect logical corruption within the data pages that only surfaces during a full restoration and subsequent consistency check.
Conversely, restoring the backup to a separate instance and running DBCC CHECKDB provides the highest level of confidence that the data is consistent and queryable. The constraint is the significant overhead in I/O, storage, and time, which may exceed maintenance windows for multi-terabyte databases.
Given these trade-offs, there is an unresolved decision regarding the execution environment for the full restore verification process.
- Should verification be performed on the production instance, risking resource contention with active workloads?
- Should a dedicated standby instance be used, incurring additional licensing and infrastructure costs?