30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7: Differential <strong>Backup</strong> <strong>and</strong> <strong>Restore</strong><br />

Everything looks good, but let's put on our "paranoid DBA" hat <strong>and</strong> double-check.<br />

Rerunning Listing 7-7 should result in the output shown in Figure 7-11.<br />

Figure 7-11: Data verification results from native T-<strong>SQL</strong> differential restore.<br />

Restoring compressed differential backups<br />

Listing 7-10 shows the script to perform the same overall restore process as the previous<br />

section, but using the compressed differential backup file.<br />

USE [master]<br />

GO<br />

RESTORE DATABASE [DatabaseForDiff<strong>Backup</strong>s]<br />

FROM DISK='C:\<strong>SQL</strong><strong>Backup</strong>s\Chapter7\DatabaseForDiff<strong>Backup</strong>s_Full_Native.bak'<br />

WITH NORECOVERY<br />

GO<br />

RESTORE DATABASE [DatabaseForDiff<strong>Backup</strong>s]<br />

FROM DISK='C:\<strong>SQL</strong><strong>Backup</strong>s\Chapter7\DatabaseForDiff<strong>Backup</strong>s_Diff_Native_Compressed.bak'<br />

WITH RECOVERY<br />

GO<br />

Listing 7-10: Restoring a compressed native differential backup.<br />

230

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!