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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8: Database <strong>Backup</strong> <strong>and</strong> <strong>Restore</strong> with <strong>SQL</strong> <strong>Backup</strong> Pro<br />

Backing up DatabaseFor<strong>SQL</strong><strong>Backup</strong>s (full database) to:<br />

C:\<strong>SQL</strong><strong>Backup</strong>s\Chapter8\DatabaseFor<strong>SQL</strong><strong>Backup</strong>s_Full_2.sqb<br />

Database size : 1.074 GB<br />

Compressed data size: 6.679 MB<br />

Compression rate : 99.39%<br />

Processed 125208 pages for database 'DatabaseFor<strong>SQL</strong><strong>Backup</strong>s', file 'DatabaseFor<strong>SQL</strong><strong>Backup</strong>s' on file 1.<br />

Processed 1 pages for database 'DatabaseFor<strong>SQL</strong><strong>Backup</strong>s', file 'DatabaseFor<strong>SQL</strong><strong>Backup</strong>s_log' on file 1.<br />

BACKUP DATABASE successfully processed 125209 pages in 5.974 seconds (163.742 MB/sec).<br />

<strong>SQL</strong> <strong>Backup</strong> process ended.<br />

Figure 8-8: <strong>SQL</strong> <strong>Backup</strong> T-<strong>SQL</strong> script results.<br />

We are now presented with two result sets. The first result set, shown in Figure<br />

8-8, provides our detailed backup metrics, including database size, <strong>and</strong> the size <strong>and</strong><br />

compression rate of the resulting backup file. The second result set (not shown) gives us<br />

the exit code from <strong>SQL</strong> <strong>Backup</strong>, an error code from <strong>SQL</strong> <strong>Server</strong> <strong>and</strong> a list of files used in<br />

the comm<strong>and</strong>.<br />

We can see from the first result set that the new backup file size is just under 7 MB, <strong>and</strong><br />

if we take a look in our directory we can confirm this. Compared to our first Red Gate<br />

backup, we can see that this is a bit less than double the original file size, but we will take<br />

a closer look at the numbers in just a second.<br />

After these metrics, we see the number of pages processed. Referring back to Chapter 3<br />

confirms that this is the same number of pages as for the equivalent native backup, which<br />

is as expected. We also see that the backup took just 6 seconds to complete which, again,<br />

is roughly double the figure for the first full backup. Figure 8-9 compares these metrics to<br />

those obtained for native backups, <strong>and</strong> compressed native backups.<br />

255

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

Saved successfully!

Ooh no, something went wrong!