DCSIMG
May 2011 - Posts - SQL SERVER DBAces And More

SQL SERVER DBAces And More

שרון כהן שכן טוב

May 2011 - Posts

How to verify that SQL Backup File is OK

In order to verify that the backup SQL file is ok before restoring the data , we can use the following syntax :

restore verifyonly from disk='C:\Test\TestBackUP.bak' - Checks to see that the backup set is complete and that all volumes are readable

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

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

 For the all list

sample for error message:

restore verifyonly from disk='C:\Test\Test_Error_BackUP.bak'

Msg 3203, Level 16, State 1, Line 1

Read on "C:\test\Test_Error_BackUP.bak' " failed: 38(Reached the end of the file.)
Msg 3013, Level 16, State 1, Line 1

VERIFY DATABASE is terminating abnormally.

-----------------------------------------------------------------------------------------------------

restore headeronly from disk='C:\Test\TestBackUP.bak'

 

 have a nice day from
sharon cohen shahen tov