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 4: Restoring From Full <strong>Backup</strong><br />

Don't let these issues dissuade you from performing full restores as <strong>and</strong> when necessary.<br />

Diligence is a great trait in a DBA, especially in regard to security. If you apply this<br />

diligence, keeping a keen eye out when restoring databases between mismatched environments,<br />

or when dealing with highly sensitive data of any kind, then you'll be fine.<br />

Performing Full <strong>Restore</strong>s<br />

We are now ready to jump in <strong>and</strong> start restoring databases! This chapter will mimic the<br />

structure of Chapter 3, in that we'll first perform a full restore the "GUI way," in SSMS,<br />

<strong>and</strong> then by using native T-<strong>SQL</strong> RESTORE comm<strong>and</strong>s. In Chapter 8, we'll perform full<br />

restores using the Red Gate <strong>SQL</strong> <strong>Backup</strong> tool.<br />

Native SSMS GUI full backup restore<br />

Using the SSMS GUI, we're going to restore the first of the two full backups (Database-<br />

ForFull<strong>Backup</strong>s_Full_Native_1.bak) that we took in Chapter 3, which was taken<br />

when the database contained about 500 MB of data. First, however, we need to decide<br />

whether we are going to restore this file over the current "live" version of the Database-<br />

ForFull<strong>Backup</strong>s database, or simply create a new database. In this case, we are going<br />

to restore over the existing database, which is a common requirement when, for example,<br />

providing a weekly refresh of a development database.<br />

But wait, you might be thinking, the current version of DatabaseForFull<strong>Backup</strong>s<br />

contains about 1 GB of data. If we do this, aren't we going to lose half that data? Indeed<br />

we are, but rest assured that all of those precious rows of data are safe in our second full<br />

database backup file, <strong>and</strong> we'll be bringing that data backup to life later in this chapter.<br />

So, go ahead <strong>and</strong> start SSMS, connect to your test instance, <strong>and</strong> then exp<strong>and</strong> the<br />

databases tree menu as shown in Figure 4-1.<br />

122

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

Saved successfully!

Ooh no, something went wrong!