Retired products

Worked example - checking a virtually restored database using DBCC CHECKDB

SQL Virtual Restore enables you to efficiently create fully functioning databases by virtually restoring backup files. This means that you can run more stringent checks on your backup files than would usually be possible without performing a full restore.

For example, you can use the DBCC CHECKDB command to check the logical and physical integrity of all the objects in a virtually restored database.

Being able to run DBCC CHECKDB against virtually restored backup files provides much greater confidence in the validity of a backup than a RESTORE VERIFYONLY check. A backup that passes a RESTORE VERIFYONLY check may still have serious data integrity problems.

Checking database integrity automatically

To automatically run the DBCC CHECKDB command after the database has been virtually restored, select the Check the integrity of the virtual database option in step 3 of the Virtual Restore Wizard.

If you also select Drop database after integrity check, the virtually restored database will be automatically dropped following the DBCC CHECKDB command, provided the command doesn't return any errors.

Checking database integrity manually

Simply run the usual DBCC CHECKDB command against a virtually restored database:

The command operates in exactly the same way for a virtually restored database, as for a standard database.


Didn't find what you were looking for?