Вы находитесь на странице: 1из 21

danielramos@sistemasuni.edu.

pe

Module 3:
Disaster Recovery

24/05/2012

danielramoscastaneda@hotmail.com

Overview

Planning a Database Backup Strategy


Backing Up a User Database
Restoring User Databases
Performing Online Restore Operations
Recovering Data from Database Snapshots
System Databases and Disaster Recovery

24/05/2012

danielramoscastaneda@hotmail.com

Lesson 1: Planning a Database Backup


Strategy

Overview of Microsoft SQL Server Backup Types


What Are Recovery Models?
What Is a Full Database Backup Strategy?
What Is a Database and Transaction Log Backup
Strategy?
What Is a Differential Backup Strategy?
What Is a File or Filegroup Backup Strategy?
Considerations for Backup Operators and Media
24/05/2012

danielramoscastaneda@hotmail.com

Overview of Microsoft SQL Server


Backup Types
Backup Types

Description

Full

All data files and part of the transaction log

Differential

The parts of the database that have changed


since the last full database backup

Partial

The primary filegroup, every read/write


filegroup, and any specified read-only
filegroups

Transaction Log

Any database changes recorded in the log files

Tail-Log Backup

Log backup taken of the tail of the log just


before a restore operation

File/File Group

Specified files or filegroups

Copy Only

The database or log (without affecting the


backup sequence)

24/05/2012

danielramoscastaneda@hotmail.com

What Are Recovery Models?


Recovery Model

Description

Simple

No log backups
Automatically reclaims log space to keep space
requirements small

Full

Requires log backups


No work is lost due to a lost or damaged data file
Can recover to an arbitrary point in time

Bulk Logged

Requires log backups


An adjunct of the full recovery model that
permits high-performance bulk copy operations
Reduces log space usage by using minimal
logging for most bulk operations

24/05/2012

danielramoscastaneda@hotmail.com

What Is a Full Database Backup


Strategy?

Sunday

Monday

Tuesday

A Full Database Backup Strategy:

Involves Performing Regular Full Backups

Is appropriate for small databases

Is almost always the first to be restored and that other


types of backup depend on it

24/05/2012

danielramoscastaneda@hotmail.com

What Is a Database and Transaction


Log Backup Strategy?

Sunday

Monday

A Database and Transaction Log Backup Strategy:

Involves performing regular backups

Supplementing regular database backups with transaction


log backups

Enables restoring the database to the last transaction log


backup

24/05/2012

danielramoscastaneda@hotmail.com

What Is a Differential Backup Strategy?

Monday

Tuesday

A Differential Backup Strategy:

Involves performing full database backups

Supplementing full database backups with differential


backups

Is useful if a subset of a database is modified more


frequently than the rest of the database

24/05/2012

danielramoscastaneda@hotmail.com

What Is a File or Filegroup Backup


Strategy?
Data
file 1
Sunday

Monday

Data
file 2
Tuesday

Data
file 3
Wednesday

A File or Filegroup Strategy:

Involves backing up individual files or filegroups on a


regular basis

Utilizes less disk space than full database backups

Is a strategy for very large databases

24/05/2012

danielramoscastaneda@hotmail.com

Considerations for Backup Operators


and Media

Database Backups can be


performed by:

SQL Server Backups:

Sysadmin Server Role


Members

Are written to a backup device

Db_owner fixed database Role


Members

Can be written to tape or disk


but not simultaneously to both

Db_backupoperator Role
Members

Are written to media sets and


media families

24/05/2012

danielramoscastaneda@hotmail.com

10

Options for Ensuring Backup Integrity


Contingencies:

Mirrored Media Sets

Backup Verification

Checksums

24/05/2012

danielramoscastaneda@hotmail.com

11

Demonstration: Backing Up a Database


In this demonstration we will:
Backup the Adventure Works database
Enable backup compression
Verify the backup
Perform a checksum

24/05/2012

danielramoscastaneda@hotmail.com

12

Lesson 2: Restoring User Databases


How the Restore Process Works
Types of Restores
Restoring a Database
Restoring a Transaction Log

24/05/2012

danielramoscastaneda@hotmail.com

13

How the Restore Process Works


The restore process consists of three distinct phases:

1.

The Data Copy Phase

2.

The Redo Phase

3.

The Undo Phase

24/05/2012

danielramoscastaneda@hotmail.com

14

Types of Restores
Restore Types:

Complete Database Restore

File Restore

Page Restore

Piecemeal Restore

Online Restore

24/05/2012

danielramoscastaneda@hotmail.com

15

Restoring a Database
Steps to Restore a Database:

1.

Perform a Tail-Log Backup

2.

Determine the Target Recovery Point


(full or bulk-logged recovery models only)

3.

Determine the Type of Restore to Apply

4.

Identify Which Backups You Require

5.

Begin the Restore Sequence

24/05/2012

danielramoscastaneda@hotmail.com

16

Restoring a Transaction Log


Steps to Restore the Transaction Log:

1.

Full or Differential Database Restore

2.

Restore Transaction Logs in Order W/ NORECOVERY

3.

Restore Latest Log WITH RECOVERY

24/05/2012

danielramoscastaneda@hotmail.com

17

Demonstration: Restoring a Database


In this demonstration, you will restore the
AdventureWorks2008 database

24/05/2012

danielramoscastaneda@hotmail.com

18

Considerations for Backing Up Systems


Databases

SQL Server maintains a set of system-level databases


which are essential for the operation of a server instance

The following system databases must be backed up


include msdb, master, and model

Back up the distribution system database if any database


uses replication on the server instance

24/05/2012

danielramoscastaneda@hotmail.com

19

Considerations for Restoring Systems


Databases
System Database

Description

Master

Backup Required: Yes


Recovery Model: Simple

Model

Backup Required: Yes


Recovery Model: User configurable

Msdb

Backup Required: Yes


Recovery Model: Simple (default)

Resource

Backup Required: No
Recovery Model: N/A

Tempdb

Backup Required: No
Recovery Model: Simple

Configuration
Distribution

Backup Required: Yes


Recovery Model: Simple

24/05/2012

danielramoscastaneda@hotmail.com

20

Daniel Ramos Castaeda


danielramoscastaneda@hotmail.com
Certificaciones:
MCP, MCTS, MAP, MCPS, MCNPS
Especializaciones:

MCPS 2.0 - AOS: Business Intelligence Competency 1


MCPS 2.0 - AOS: Competency- Integrated E-Business Solutions
AOS: Application Integration Competency
MCPS 2.0 - AOS: Data Platform Competency
MCTS: SQL Server 2005 y 2008
AOS: Business Intelligence Competency 2
AOS : BUSINESS INTELLIGENCE COMPETENCY - BUSINESS INTELLIGENCE
PLATFORM
AOS: Data Management Solutions Competency-Database Management for
SQL Server 2005
AOS : Microsoft Dynamics AX - SQL server
AOS : ERP Competency - Microsoft Dynamics GP - SQL server
AOS : Microsoft Dynamics NAV - SQL server
AOS : Microsoft Dynamics SL - SQL Server
AOS : Microsoft Dynamics Point of Sale - SQL Server

24/05/2012

danielramoscastaneda@hotmail.com

21

Вам также может понравиться