Restore Scenarios What to keep in mind. Pedro A. Lopes PFE



Similar documents
Backup and Recovery in MS SQL Server. Andrea Imrichová

Module 07. Log Shipping

EMC APPSYNC AND MICROSOFT SQL SERVER A DETAILED REVIEW

Backing Up and Restoring the SQL Server 2005 Environment

This article Includes:

Exam : Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2. Title : The safer, easier way to help you pass any IT exams.

Backup and Restore Back to Basics with SQL LiteSpeed

SQL Server 2005 Backing Up & Restoring Databases

Backup and Restore Strategies for SQL Server Database. Nexio Motion. 10-February Revsion: DRAFT

Nexio Motion 4 Database Backup and Restore

Technical Notes. EMC NetWorker Performing Backup and Recovery of SharePoint Server by using NetWorker Module for Microsoft SQL VDI Solution

Course Syllabus. Maintaining a Microsoft SQL Server 2005 Database. At Course Completion

Course Syllabus. At Course Completion

KEYWORDS InteractX, database, SQL Server, SQL Server Express, backup, maintenance.

Dell NetVault Backup Plug-in for SQL Server 6.1. User s Guide

White Paper. EMC REPLICATION MANAGER AND MICROSOFT SQL SERVER A Detailed Review

EMC NetWorker Module for Microsoft SQL Server ADMINISTRATOR S GUIDE. Release 5.0 P/N E

MOC 20462C: Administering Microsoft SQL Server Databases

SQL Server. New backup and recovery. q t q. in SQL Server 2005 INSIDE. Tips for SQL Server pros March 2007

BrightStor ARCserve Backup for Windows

Scheduling Tansaction Log Restores on a Standby SQL Server

Module 2: Database Architecture

SQL Server Backup and Restore

EMC NetWorker Module for Microsoft SQL Server Release 5.1

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Destiny system backups white paper

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

EMC NetWorker Module for Microsoft SQL Server Release 5.2 Service Pack 1

EMC NetWorker Module for Microsoft SQL Server

Maintaining a Microsoft SQL Server 2008 Database

SQL Server Protection Whitepaper

6231A - Maintaining a Microsoft SQL Server 2008 Database

Backup,Restore and Recovery. Training Division New Delhi

Administering and Managing Log Shipping

CA ARCserve and CA XOsoft r12.5 Best Practices for protecting Microsoft SQL Server

Protecting Microsoft SQL Server with Asigra Cloud Backup

EMC NetWorker Module for Microsoft for Windows Bare Metal Recovery Solution

Administering Microsoft SQL Server Databases

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Basic knowledge of the Microsoft Windows operating system and its core functionality Working knowledge of Transact-SQL and relational databases

SQL Server for Database Administrators Course Syllabus

Backups and Maintenance

Best Practices for Backup and Restore in SQL Server 2005

Computer Visions Course Outline

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

How To Use A Microsoft Microsoft Database Server 2012

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

SQL Server Backup and Restore

Designing Database Solutions for Microsoft SQL Server 2012 MOC 20465

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

Enterprise PDM - Backup and Restore

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

MS Administering Microsoft SQL Server Databases

EMC NetWorker Module for Microsoft for SQL VDI

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

CA ARCserve Backup for Windows

EMC NetWorker Module for Microsoft for SQL VDI

Recover a CounterPoint Database

Symantec Backup Exec 2014 Icon List

form approved June/2006 revised Nov Page 1 of 7

If a database is using the Simple Recovery Model, only full and differential backups of the database can be taken.

Course. Overview. Length: 5 Day(s) Published: English. IT Professionals. Level: Type: Method: Delivery. Enroll now (CAL)

EMC NetWorker Module for Microsoft for SQL VDI

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

CA ARCserve Backup for Windows

SQL Server 2014

Ckpdb and Rollforwarddb commands

How To Backup A Database In Navision

EMC DOCUMENTUM xplore 1.1 DISASTER RECOVERY USING EMC NETWORKER

Administering Microsoft SQL Server Databases

Feature. Database Backup and Recovery Best Practices

EMC NetWorker Module for Microsoft Applications

Best Practices for Backup of Microsoft SQL 2000 Databases with Unitrends Backup Professional

Course Outline:

EMC NetWorker Module for Microsoft Applications

WHITE PAPER: ENTERPRISE SOLUTIONS. Symantec Backup Exec Continuous Protection Server Continuous Protection for Microsoft SQL Server Databases

Support Document: Microsoft SQL Server - LiveVault 7.6X

Designing and Deploying Messaging Solutions with Microsoft Exchange Server 2010 Service Pack B; 5 days, Instructor-led

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

PassTest. Bessere Qualität, bessere Dienstleistungen!

Handling a Full SQL Server Transaction Log

Dell NetVault Backup Plug-in for SharePoint 1.3. User s Guide

Implementing a Microsoft SQL Server 2005 Database

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

Backup and Restore with 3 rd Party Applications

ADMINISTERING MICROSOFT SQL SERVER DATABASES

Microsoft SQL Database Administrator Certification

Administering Microsoft SQL Server Databases

Whitepaper - Disaster Recovery with StepWise

Microsoft SQL Server 2005 Database Mirroring

Copyright Acronis, Inc.,

EMC Backup and Recovery for Microsoft SQL Server 2008 Enabled by EMC Celerra Unified Storage

Backup and Recovery for Microsoft SQL Server Using EMC Data Domain Deduplication Storage Systems

VERITAS NetBackup 6.0 for Microsoft SQL Server

Administering Microsoft SQL Server Databases 20462C; 5 days

EMC NetWorker Module for Microsoft for Windows Bare Metal Recovery Solution

StarWind iscsi SAN Software: Implementation of Enhanced Data Protection Using StarWind Continuous Data Protection

Oracle Database 10g: Backup and Recovery 1-2

Database Maintenance Guide

Transcription:

Restore Scenarios What to keep in mind Pedro A. Lopes PFE

Backup types Full Backup Differential Backup (Database or FG) Transaction Log Backup (Tail of the Log) Partial Backup (Piecemeal - Filegroup) Mirrored Backup (from 2005 onwards) Copy-only Backup (from 2005 onwards) 2

Restore The restore operation will depend on the strategy followed and the recovery model. Usually the restore operation consists of multiple backup files that are restored one after another to: Place a database in a particular state. Ensure recovery of the maximum amount of data. 3

Restore Types Full database restores Piecemeal restores (Using differential database or file restores) File or Filegroup restores. Page level restores (from 2005 onwards) Transaction log restores for point in time recovery Revert a database to the point in time captured by a database snapshot (from 2005 onwards)

Restore Steps Restoring a database file consists of two steps: Creating any missing database files. Copying the data from the backup devices to the database files. 5

Restore Steps (Cont.) Restoring a database or differential backup consists of four steps: Creating the database and transaction log files if they do not already exist. Copying all the data, log, and index pages from the backup media of a database to the database files. Applies the transaction log up to the recovery point (redo). If at this point, a database has uncommitted transactions then it starts recovery. The undo phase is part of the recovery phase. This rolls back any uncommitted transactions and makes the database available to users. After recovery, subsequent backups cannot be restored. 6

Restore Steps (Cont.) Applying a transaction log backup consists of: Copying data from the backup devices to the transaction log file. Start the redo phase, which applies the logged transactions to roll forward the data to the recovery point. This point in time is generally the last operation that was executed against the database. However you can select a different point: A transaction log backup contains a sequence of transactions identified by an LSNs. Transactions can also be explicitly named by placing a mark in the transaction log. 7

Restore - Comparison of RECOVERY and NORECOVERY Roll back is controlled by the RESTORE statement through the [RECOVERY NORECOVERY] options: NORECOVERY specifies that roll back not occur. In this case, the restore sequence can restore other backups and roll them forward. RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for the current backup. 8

Restore You can restore a database to a particular LSN, named transaction, or point in time. STOPAT = { 'datetime' @datetime_var } STOPATMARK = { 'lsn:lsn_number' } [ AFTER 'datetime'] STOPBEFOREMARK = { 'lsn:lsn_number ' } [ AFTER 'datetime'] Usually used when restoring a database that has become corrupted, or a major change has to be rolled back. 9

Demo Marked Trans 10

Page Restore Restore damaged pages without restoring the whole database. Typically, pages candidates for restore are marked as "suspect" because of an error when accessing the page. Suspect pages are identified in the suspect_pages table in the msdb database. Useful if you have to restore no more than a few pages in a file. Syntax: RESTORE DATABASE database_name PAGE = 'file:page [,...n ]' [,...n ] FROM <backup_device> [,...n ] WITH NORECOVERY

Page Restore (Cont.) - Limitations Only database pages can be restored. Page restore cannot be used to restore the following: Transaction log Allocation pages: GAM, SGAM and PFS pages. Page 0 of all data files (the file boot page). Page 1:9 (the database boot page). Full-text catalog. If an individual page cannot be restored, you must use the existing full database backup or full file or filegroup backup.

Page Restore (Cont.) - Requirements A page restore is subject to the following requirements: Databases must be in full or bulk-logged recovery model. Pages in read-only filegroups cannot be restored. The restore sequence must start with a full, file, or filegroup backup. Requires an unbroken chain of log backups up to the current log file, and they must all be applied so that the page is brought up to date with the current log file. A database backup cannot be run at the same time.

Database Recovery Advisor The Database Recovery Advisor is a new SQL Server 2012 feature to easily allow SSMS users to do pointin-time database restore and Database Page restores from the GUI.

Database Recovery Advisor Although this improvement is called Database Recovery Advisor, these improvements are available via the Restore Database dialog and new Page Restore dialog. Available even if you don t have any msdb backup history.

Demo Recovery Advisor 16

Piecemeal Restore Allows partial database availability during restore, unlike in SQL 2000. Based on file / filegroup backup. Works with all recovery models, but is more flexible for the full and bulk-logged models. Supported only for databases with multiple filegroups. Filegroups must be recovered to a consistent point. All editions of SQL Server support offline piecemeal restores. In SQL Server 2005 Enterprise Edition and later versions, a piecemeal restore can be either online or offline.

Piecemeal Restore Starts with an initial restore sequence called the partial-restore sequence. Minimally, the partial-restore sequence restores and recovers the primary filegroup and, under the simple recovery model, all read/write filegroups. During the piecemeal-restore sequence, the whole database must go offline. Thereafter, the database is online and restored filegroups are available.

Piecemeal Restore scenarios Offline: Database is online after the partial-restore sequence. Filegroups that have not yet been restored remain offline, but they can be restored as you need them after taking the database offline. Simple RM supports this scenario only. Online: After the partial-restore sequence, the database is online, and the primary filegroup and any recovered secondary filegroups are available. Filegroups that have not yet been restored remain offline, but they can be restored as needed while the database remains online.

Piecemeal Restore of Database In this example, database is restored to a new computer after a disaster. Before the disaster, all the filegroups are online: Filegroups [Primary], [ONLINE_FG] and [RO_FG] are read/write. Filegroup [RO_FG] became read-only after the full file backup, which contains the primary filegroup and the read/write secondary filegroups. After filegroup [RO_FG] became read-only, a separate partial file backup of read-write filegroups was taken. After filegroup [RO_FG] became read-only, a separate file backup of filegroup [RO_FG] was taken.

Demo PiecMeal Restore 21

Questions? 22

Visit http://blogs.msdn.com/b/blogdo ezequiel/ for more insights on SQL Server. 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION