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 />

Figure 8-24: Restoring to a new, st<strong>and</strong>by copy of the DatabaseFor<strong>SQL</strong><strong>Backup</strong>s database.<br />

At Step 3, we're going to choose a new option for the completion state of our restored<br />

database, which is Read-only (RESTORE WITH STANDBY). In doing so, we must create an<br />

undo file for the st<strong>and</strong>by database. As we subsequently apply transaction log backups to<br />

our st<strong>and</strong>by database, to roll forward in time, <strong>SQL</strong> <strong>Server</strong> needs to be able to roll back the<br />

effects of any transactions that were uncommitted at the point in time to which we are<br />

restoring. However, the effects of these uncommitted transactions must be preserved.<br />

As we roll further forward in time, <strong>SQL</strong> <strong>Server</strong> may need to reapply the effects of a transaction<br />

it previously rolled back. If <strong>SQL</strong> <strong>Server</strong> doesn't keep a record of that activity, we<br />

wouldn't be able to keep our database relationally sound. All of this information regarding<br />

the rolled back transactions is managed through the undo file.<br />

We'll place the undo file in our usual <strong>SQL</strong><strong>Backup</strong>s directory. In the central portion of the<br />

screen, we have the option to restore the transaction log to a specific point in time; we're<br />

going to roll forward in stages, first to a point as close as we can after 10:41:36.540, which<br />

should be the time we completed the batch of 41 INSERTs into MessageTable1. Again,<br />

remember that in a real restore scenario, you will probably not know which statements<br />

were run when.<br />

283

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

Saved successfully!

Ooh no, something went wrong!