Data Disaster Recovery Planning Greg Fibiger 1/7/2016.

Slides:



Advertisements
Similar presentations
Recovery CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Advertisements

Module 7 Restoring SQL Server 2008 R2 Databases. Module Overview Understanding the Restore Process Restoring Databases Working with Point-in-time Recovery.
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
©2006 ITT Educational Services Inc. Course Name: IT390 Business Database Administration Unit 5 Slide 1 IT390 Business Database Administration Unit 5 :
SharePoint and SQL Server integration Demo: SQL Server Optimizing Configurations SQL Server 2014 for SharePoint 2013 Avoiding ginormous transaction.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Keith Burns Microsoft UK Mission Critical Database.
1 - Oracle Server Architecture Overview
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
Week 9 – Chapter 8 SQL 710 Methods to Backup Databases
Module 7: Restoring Databases. Overview SQL Server Recovery Process Preparing to Restore a Database Restoring Backups Restoring Databases from Different.
Module 6: Backing Up Databases. Overview Preventing Data Loss Setting and Changing a Database Recovery Model SQL Server Backup When to Back Up Databases.
SQL Server 2012 Always On Premier Field Engineer Microsoft Corporation Lisa Gardner
Module 5 Understanding SQL Server 2008 R2 Recovery Models.
National Manager Database Services
Modification is sent by application to SQL Server Modification is sent by application to SQL Server 1 Data pages are located in, or.
1 Chapter Overview Understanding Backup Terms, Media, and Devices Backing Up Databases, Files, Filegroups, and Transaction Logs Restoring a User Database.
SQL Server 2008 Implementation and Maintenance Chapter 7: Performing Backups and Restores.
Chapter 11: Designing a Data Recovery Solution for a Database MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study.
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
MODIFY THIS SLIDE FOR ACTUAL PRESENTER, DELETE THIS BAR AFTER MODIFICATION.
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
Architecture Rajesh. Components of Database Engine.
Module 6 Backup of SQL Server 2008 R2 Databases. Module Overview Backing up Databases and Transaction Logs Managing Database Backups Working with Backup.
7202ICT – Database Administration
MS SQL by: Bryan Bankhead CIS 407. General Concepts  Backing up and Restoring databases and transaction logs is a way that SQL Server provides protection.
Transactions and Locks A Quick Reference and Summary BIT 275.
1 Chapter Overview Understanding Data Restoration Issues Understanding the Types of Database Backups Understanding the Restoration Process.
Learningcomputer.com SQL Server 2008 – Backup and Restore Database.
DBI302 AlwaysOn Availability Groups for database protection AlwaysOn Availability Groups for database protection AlwaysOn Failover Cluster Instances.
Enhancing Scalability and Availability of the Microsoft Application Platform Damir Bersinic Ruth Morton IT Pro Advisor Microsoft Canada
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Backup and Recovery - II - Checkpoint - Transaction log – active portion - Database Recovery.
Virtual Machine Movement and Hyper-V Replica
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Narasimha Reddy Gopu Jisha J. Agenda Introduction to AlwaysOn * AlwaysOn Availability Groups (AG) & Listener * AlwaysOn Failover * AlwaysOn Active Secondaries.
Backing Up and Restoring Databases Advanced Database Dr. AlaaEddin Almabhouh.
SQL Server High Availability Introduction to SQL Server high availability solutions.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
AlwaysOn In SQL Server 2012 Fadi Abdulwahab – SharePoint Administrator - 4/2013
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
High Availability & Disaster Recovery with SQL Server AlwaysOn Availability Groups Turgay Sahtiyan Microsoft – Senior SQL Server PFE
Database recovery contd…
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
Database Administration
Transaction Log Fundamentals
Managing Multi-User Databases
Disaster Recovery Where to Begin
AlwaysOn Mirroring, Clustering
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Always On Availability Groups
Contained DB? Did it do something wrong?
Chapter Overview Understanding the Database Architecture
Required 9s and data protection: introduction to sql server 2012 alwayson, new high availability solution Santosh Balasubramanian Senior Program Manager.
AlwaysOn, an Early bird Overview
Denali Always On for Mission Critical Systems
Back Up and Restore? Piece of Cake!
Backup and Restore your SQL Server Database
SYED SAJID WASIM SQL SERVER ALWAYS ON Step by Step.
Transaction Log Fundamentals
Active Secondary: Enabling Backup On Secondary
AlwaysOn Availability Groups
Transaction Log Internals and Performance David M Maxwell
High Availability/Disaster Recovery Solution
Performing Database Recovery
Distributed Availability Groups
Backup & Recovery.
Designing Database Solutions for SQL Server
Presentation transcript:

Data Disaster Recovery Planning Greg Fibiger 1/7/2016

Backup & Restore

Determining an Appropriate Backup Strategy Different backup types can be combined -Data based Backups (Full, Differential, Copy, Filegroup, File) -Log based Backups (Log, Tail Log) Safety levels should be determined -How long can recovering take? (RTO) -How much data is it acceptable to lose? (RPO) -Is it possible to recover the data from other sources? Backup strategy should be mapped to requirements -Types and frequency of backups -Backup media to use -Retention period for backups and for media -Backup testing policy

Choosing Appropriate Backup Media A single backup is called a backup set Backup sets are written to media sets that are comprised of one or more backup devices Media sets can contain several backup sets Backup devices can be physical or logical -Physical devices are disk files Not all users can perform backups

Determining a Retention and Testing Policy for Backups Planning for backup retention must be part of the strategy -Should form part of the test plan to ensure accuracy Several considerations: -Combination of backups needed for a database recovery -Archival requirements -Synchronisation with database checks -Available secure storage location -Hardware required for restoring backups -Completeness of backups

Transaction Log File Structure Sufficient information is logged to be able to: -Roll back transactions if requested -Recover the database in case of failure Write Ahead Logging is used to create log entries -Transaction logs are written in chronological order in a circular way -Truncation policy for logs is based on the recovery model

Overview of SQL Server Transaction Logs Buffer Cache Data pages are located in, or read into, the buffer cache and then modified Data pages are located in, or read into, the buffer cache and then modified 2 2 Modification is recorded in transaction log on disk 3 3 Later, checkpoint writes dirty pages to database Later, checkpoint writes dirty pages to database 4 4 Data modification is sent by application Data modification is sent by application 1 1 Transaction logs provide a history of actions executed by a database management system to guarantee Atomicity and Durability properties

Full Database Backup Strategies Full Database Backups: Backup all data and part of the log records Can be used to restore the whole database Permit recovery to backup times only SundayMondayTuesday

Transaction Log Backup Strategies SundayMonday A Database and Transaction Log Backup Strategy: Involves at least full and transaction log backups Enables point in time recovery Allows the database to be fully restored in the case of data file loss

Differential Backup Strategies Monday Tuesday A Differential Backup Strategy: Involves performing full and differential database backups Includes differential backups with only changed data Is useful if only a subset of a database is modified more frequently than the rest of the database

Performing a Full Database Backup BACKUP DATABASE Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB.bak' WITH INIT; BACKUP DATABASE Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB.bak' WITH INIT; Backup entire database Backup active portion of log file

Performing Differential Backups BACKUP DATABASE Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB_Diff.bak' WITH DIFFERENTIAL, INIT; BACKUP DATABASE Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB_Diff.bak' WITH DIFFERENTIAL, INIT; Backup the extents changed since the last full database backup Store active part of the transaction log to be able to recover the database Independent of other differential backups Note: You cannot create a differential database backup if no full backup has ever been created

Performing Transaction Log Backups BACKUP LOG Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB_Log.bak' WITH NOINIT; BACKUP LOG Legend Build 2.0 TO DISK = 'L:\SQLBackups\LB_Log.bak' WITH NOINIT; Backup the transaction log only Backs up log from the last successfully executed log backup to the current end of the log Truncates inactive log records unless options specified Note: Database must be in full or bulk-logged recovery model

Options for Ensuring Backup Integrity Mirrored Media Sets A backup set can be mirrored to up to 4 media sets Mirrors require the same number of backup devices Support in Enterprise Edition only CHECKSUM backup option Available for all backup types Generates a checksum over the backup stream Can be used to verify the backup Backup verification RESTORE VERIFYONLY can be used for backup verification Useful when combined with the CHECKSUM option

Restoring a Database RESTORE DATABASE Legend Build 2.0 FROM DISK = 'D:\SQLBackups\LB.bak' WITH RECOVERY; RESTORE DATABASE Legend Build 2.0 FROM DISK = 'D:\SQLBackups\LB.bak' WITH RECOVERY; Full and differential backups are restored using the RESTORE DATABASE statement Only the last differential backup needs to be restored Restore each backup in order and WITH NORECOVERY, if additional transaction log backups need to be restored

Restoring a Transaction Log RESTORE LOG Payroll FROM DISK = 'D:\SQLBackups\PayrollLogs.bak' WITH NORECOVERY; RESTORE LOG Payroll FROM DISK = 'D:\SQLBackups\PayrollLogs.bak' WITH NORECOVERY; Transaction Log Backups are restored using the RESTORE LOG statement An unbroken log chain sequence must be provided

Always On Demo

Always ON Clustering (SQL Server)

Availability Group Architecture Windows Server Failover Cluster Database Active Log Synchronization Database Active Log Synchronization Availability Group uses Windows Server Failover Cluster (WSFC) for WSFC Common Microsoft Availability Platform  SQL Server AlwaysOn Failover cluster instances  SQL Server AlwaysOn Availability Group  Microsoft Hyper-V  Microsoft Exchange  Built-in WSFC workloads (e.g. file share, NLB, etc) and third party workloads  Inter-node health detection,  Failover coordination,  Primary health detection,  Distributed data store for settings and state,  Distributed change notifications

Application Failover Availability Groups Listener allow applications to failover seamlessly to any secondary Application reconnects using a virtual name after a failover to a secondary ServerAServerBServerC PrimarySecondary HR DB HR DB HR DB Application retry during failover server HR_Listener;-catalog HRDB Connect to new primary once failover is complete and the listener is online HR_VNN AG_HR Primary

Active Secondary – Making Secondary Readable SQLservr.exe InstanceA DB2DB1 Reports Failover SQLservr.exe InstanceB DB2DB1 Reports Readable secondary allow offloading read queries to secondary Close to real-time data, latency of log synchronization impact data freshness Primary Secondary Reports

Active Secondary: Enabling Backup On Secondary Backups can be done on any replica of a database Backups on primary replica still works Log backups done on all replicas form a single log chain Database Recovery Advisor makes restores simple R/W workload Primary Backups Secondary Backups Secondary Backups

BACKUP AND RESTORE DEMO

© 2016, The Sage Group plc. Thank you