HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What is a good way to verify that a restore completed successfully in SQL Server?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whatsqlwayverifycompletedthatgoodserverrestoresuccessfully

Problem

Right now, we test our SQL backups once a month by pulling the most recent backup file and restoring it onto a test database. If SQL Server says the restore is successful, we spot-check a few tables to make sure they have data in them.

Is it safe to assume that the restore was completely successful if SQL Server says it was? Is there a good way to verify that the restored data/indexes/etc are correct?

Solution

It is considered good practice where I work to run DBCC CHECKDB after a restore, especially if the backup is of an unknown quality.

CHECKDB will at least tell you if your DB has any consistency errors, and checks the logical and physical integrity of all the objects in the specified DB.

A similar thread is on ServerFault: https://serverfault.com/questions/187869/should-i-run-dbcc-checkdb-before-full-backups-or-after

Context

StackExchange Database Administrators Q#10084, answer score: 3

Revisions (0)

No revisions yet.