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 1: Basics of <strong>Backup</strong> <strong>and</strong> <strong>Restore</strong><br />

(Chapters 3 to 8) will focus on database backups (full <strong>and</strong> differential) <strong>and</strong> transaction log<br />

backups. However, we do cover file backups in Chapters 9 <strong>and</strong> 10.<br />

Note that the exact types of backup that can be performed, <strong>and</strong> to some extent the<br />

restore options that are available, depend on the recovery model in which the database<br />

is operating (SIMPLE, FULL or BULK_LOGGED). We'll be discussing this topic in more<br />

detail shortly, in the Recovery Models section, but for the time being perhaps the most<br />

notable point to remember is that it is not possible to perform transaction log backups<br />

for a database operating in SIMPLE recovery model, <strong>and</strong> so log backups play no part of a<br />

database RESTORE operation for these databases. Now we'll take a look at each of these<br />

types of backup in a little more detail.<br />

<strong>SQL</strong> <strong>Server</strong> database backups<br />

The database backup, which is a backup of your primary data file plus any secondary<br />

database files, is the cornerstone of any enterprise's backup <strong>and</strong> recovery plan.<br />

Any database that is not using file backups will require a strategy for performing database<br />

backups. Consider, for example, the situation in which a <strong>SQL</strong> <strong>Server</strong> database crashes,<br />

perhaps due to a hardware failure, <strong>and</strong> the live data file is no longer accessible. If no<br />

backups (copies) of this file exist elsewhere, then you will suffer 100% data loss; the<br />

"meltdown" scenario that all DBAs must avoid at all costs.<br />

Let's examine the two types of database backup, full <strong>and</strong> differential. Each of them<br />

contains the same basic type of information: the system <strong>and</strong> user data <strong>and</strong> objects stored<br />

in the database. However, viewed independently, the former contains a more complete<br />

picture of the data than the latter.<br />

29

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

Saved successfully!

Ooh no, something went wrong!