Sunday, September 23, 2012

SQL SERVER - How to verify Backup FIle before restoring

Verify backup-   There are some script to check and verify existing database before restoring. SQL Server has provided some Keywords that are mentioning below:-
  1. Verifyonly
  2. Headeronly
  3. Filelistonly
  4. Labelonly
-- - Checks to see that the backup set is complete and that all volumes are readable
restore verifyonly from disk='C:\Bacukup\Test_backup_DB.bak'

 ---Returns a result set containing all the backup header information for all backup sets on a particular backup device
restore headeronly from disk='C:\Bacukup\Test_backup_DB.bak'

 --- Returns a result set containing a list of the database and log files contained in the backup set.
restore filelistonly from disk='C:\bacukup\Test_backup_DB.bak'

 --sample for error message:
restore verifyonly from disk='C:\Test\Test_Error_BackUP.bak'

 --ingormation and software version information
RESTORE LABELONLY FROM DISK='C:\Backup\Full_Test_Error_BackUP.bak'

Like and Share to SQL Integrity Blog

No comments:

Post a Comment

Thank You !!!!