Backup from a remote location

  • Hi,,

        I have a problem, I have to take a backup on my local machine from the server residing in another country, and then to restore the backup (differential) from the local machine. this has to be scheduled at night. But before taking backup how can check for the integrity of the backup file, I'am bit worried as the network drive sometimes get disconnected. So can someone provide me theT-SQL script for the checking the integrirty of the backup file before executing the restore command.

    thanx

    Charul Kumar Bhargava

    Thanks Peter for ur help I had been using the following script, but as u have mentioned I also wanted to know if there's any way we  can check for the structure & data integrity in the backup file.....

    BACKUP DATABASE [Test_Latest] TO [Test320] WITH  INIT ,  NOUNLOAD ,  NAME = N'ASLCOM320',  NOSKIP ,  STATS = 10,  NOFORMAT

    DECLARE @i INT

    select @i = position from msdb..backupset where database_name='test_Latest' and type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name='Test_Latest')

    RESTORE VERIFYONLY FROM  [RD_320_Latest]  WITH FILE = @i

    select * from Sysdevices;

    Can u provide me the complete T-SQL Script for successfull Full And Differential Backup With Restore (including verification) ?  As what i have mentioned is an incomplete script.

    Regards,
    NEO

  • Try using the RESTORE VERIFYONLY FROM DISK ... command.  Note that this only verifies whether the file can be read, and does not check if the file is a valid SQL Server backup file.

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply