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 6: Log <strong>Restore</strong>s<br />

Now switch to the Options page <strong>and</strong> you should see something similar to Figure 6-7.<br />

Figure 6-7: Configuring the data <strong>and</strong> log files for the target database.<br />

This time we want to complete the restore <strong>and</strong> bring the database back online, so we can<br />

leave the default option, RESTORE WITH RECOVERY selected. Once you're ready, click<br />

OK <strong>and</strong> the log backup restore should complete <strong>and</strong> the DatabaseForLog<strong>Backup</strong>s_<br />

<strong>Restore</strong>Copy database should be online <strong>and</strong> usable.<br />

As healthy, paranoid DBAs, our final job is to confirm that we have the right rows in each<br />

of our tables, which is easily accomplished using the simple script shown in Listing 6-2.<br />

USE DatabaseForLog<strong>Backup</strong>s_<strong>Restore</strong>Copy<br />

SELECT COUNT(*) FROM dbo.MessageTable1<br />

SELECT COUNT(*) FROM dbo.MessageTable2<br />

SELECT COUNT(*) FROM dbo.MessageTable3<br />

Listing 6-2: Checking our row counts.<br />

193

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

Saved successfully!

Ooh no, something went wrong!