Upload
trivegg
View
222
Download
0
Embed Size (px)
Citation preview
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 1/19
CoCreative Solutions
How Microsoft SQL Server caters to
Disaster Recovery (DR)High Availability (HA)
Paul PaivaCoCreative Solutions, LLC
http://paulpaivasql.blogspot.com
April 19, 2011
Overview of DR and HA
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 2/19
CoCreative Solutions
DR vs. HA
• Disaster Recovery
– If there is a natural or human-induceddisaster, can we recover?
• High Availability
– How much downtime is acceptable?
– What is the customer’s SLA?
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 3/19
CoCreative Solutions
3 Recovery ModelsBackups can beconfigured with threedifferent recovery
models
•Simple•Full
•Bulk-logged
See:
Database Properties,
Options tab
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 4/19
CoCreative Solutions
DR – 3 Backup Models
1. Simple
– Advantages• No need for log backups.
• Easier to manage, less files.
– Disadvantages• Can recover only to the last backup.
– Appropriate if
• There is a way to manually re-enter data to point offailure.
• Data changes infrequently.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 5/19
CoCreative Solutions
DR – Backup Models
2. Full
– Can recover to the last transaction log
• Point-in-time restore is possible.
– to last Time, Mark, or Log Sequence Number (LSN)
– Backup Transaction Logs periodically• Hourly, every 15 minutes, etc.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 6/19
CoCreative Solutions
DR – Backup Models
Differential
• Only backups portions of database/file that havechanged since the last full backup.
• Advantages – File sizes are smaller
– No need to apply all the transaction logs.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 7/19
CoCreative Solutions
Point-in-Time Restore
From SQL Server BOL
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 8/19
CoCreative Solutions
DR – Backup Models
3. Bulk Logged
– Can recover to the last transaction log
• Point-in-time is not supported
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 9/19
CoCreative Solutions
Backup Syntax
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 10/19
CoCreative Solutions
Script a Simple Backup for All Databases
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 11/19
CoCreative Solutions
Other Backup Options
– Copy_Only• Does not interrupt the sequence of transaction log backups
– Compression
• SQL 2008, enterprise edition• SQL 2008 R2, all editions
– File or Filegroup only
• Useful when only one or more tables need to be
safeguarded. – Snapshots
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 12/19
CoCreative Solutions
High Availability
• How much downtime is acceptable?
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 13/19
CoCreative Solutions
HA - Methods
• Replication
– Peer-to-Peer (transactional) – Publisher/Subscriber model
– Allows only certain objects to be replicated
– Object schema must be identical – Schema changes require system to be quiesced.
– Some overhead: distributor needs to be configured
and maintained. – Data conflicts can be introduced and need to be
resolved.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 14/19
CoCreative Solutions
HA - Methods
• Failover Clustering
– for whole SQL Instance (all databases aresafeguarded)
– Nodes need to be in close proximity to each other
– Auto failover
– Does not protect against disk failure• Nodes share the same disk.
• Disk files on RAID
– Arguably the best method for most stringentrequirements
• Most expensive, most work involved to configure, morehardware required.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 15/19
CoCreative Solutions
HA - Methods
• Database Mirroring
– One database is safeguarded (at-a-time) – Consists of a Principal and Mirror database
– Synchronous
• Safest – the mirror is always in synch.• Auto-failover is possible by using a 3rd machine, a
Witness
– Asynchronous• allows faster speeds, however some latency maydevelop
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 16/19
CoCreative Solutions
HA - Methods
• Log Shipping
– One database (at-a-time) is safeguarded
– Very simple, easiest to maintain
– Primary and backups can be separated by fardistances.
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 17/19
CoCreative Solutions
Fallback Server
• A human-introduced error will immediately
propagate to the other cluster nodes ormirror nodes.
• Remedy: Lagging Fallback Server
– Configure a fallback server to receivetransactional logs
– Make it lag the production database
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 18/19
CoCreative Solutions
Summary
• DR
– As a rule, use FULL backup model – Store copy of back ups off site
• HA
– Clustering (high cost)• auto failover
– Mirroring (per database)• auto failover
– Log Shipping (per database)• Can be configured to have a lag
– Replication (per object)
8/6/2019 Disaster Recovery and High Availability, Overview of
http://slidepdf.com/reader/full/disaster-recovery-and-high-availability-overview-of 19/19
CoCreative Solutions Introduction to
DR and HA
• Thanks for your time and attention!
• Questions?
Paul Paiva
CoCreative Solutions, LLC
[email protected]://paulpaivasql.blogspot.com
April 19, 2011