keith burns microsoft uk [email protected] mission critical database

17
Keith Burns Microsoft UK [email protected] Mission Critical Database

Post on 20-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Keith BurnsMicrosoft UK

[email protected]

Mission Critical Database

Page 2: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Microsoft SQL Server® 2008 R2 HA/DR Technologies

Backup and Restore

Log Shipping

Failover Clustering

Database Mirroring

Transactional and peer-to-peer replication

Page 3: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Business Continuity Solutions

Points to consider• Automatic or manual detection of errors• Automatic or manual failover• Acceptable data loss– Recovery Point Objective (RPO)

• Time it takes to failover– Recovery Time Objective (RTO)

• Number of failures to survive• Recovery Granularity:– Instance, Database, Table, Page or

Row• Cost• Complexity

Page 4: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Backup• Permanent copy of data

• Online restore

• Bring database online as soon as primary file

group is restored

• Access restored portion of database while remainder is restored

• Backup compression in SQL Server 2008 R2

• Reduce volume significantly

• Faster restore and backup

• Compress UCS-2 Unicode data

• Cost-effective ─ no specialized hardware is required

• Straightforward setup and administration

• RPO can be 100%

• RTO: Time to backup txn log & restore all backup(s)

Page 5: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Backup Media Mirroring Mirroring a media set increases backup

reliability by reducing the impact of backup-device malfunctions

Creating checksums on backup media enables verifying subsequent restore operations

Having a mirror can resolve some restore errors quickly by substituting the mirrored media for damaged backup media

“The backup media mirroring feature of SQL Server enables you to perform a mirrored backup of a database to multiple backup devices, which greatly increases the reliability of backups in case of faulty media or a lost backup device.”

—High Availability White Paper

1100101001010010

1100101001010010

1100101001010010

1100101001010010

1100101001010010

1100101001010010

1100101001010010

1100101001010010

1100101001010010

Page 6: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Online, Piecemeal restore• Almost any component (page, file,

filegroup) can be restored – ONLINE

• If a page is damaged– restore only that page from a file, filegroup or database

backup

• If a file is damaged– restore only that file from a file, filegroup or database

backup

•If a filegroup is damaged• restore only that filegroup from a filegroup or database

backup

• Readonly filegroups can be restored without rolling forward log changes

• Users can access the database during the restore

Page 7: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Log Shipping• Protect data against user

errors on the primary server• Pros

• Good DR solution• Multiple Secondary databases• Time delay for replaying txn logs• May not require an additional lic.

• Cons• Exclusive access required to apply log• Manual failover• Different server name.• How to restore secondary?

• RPO: Probably not 100%• RTO: Not automatic

Page 8: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Multi-Instance Clustering• More than one passive node is

available to host instances from multiple failovers on active nodes

• Having multiple failover nodes provides greater availability

• Multiple instances can share the same failover node, which reduces hardware costs

• Simplified setup reduces administrative costs

• 1 copy of data => disk(s) need to be “fault tolerant”

• Stretch clusters often used for D.R.

• RTO: ~ 1min (automatic detection & failover)

• RPO: 100%

OfflineFailover Active

Applications & Business Logic 11001

010010111001010010111001

0

110010100101 110010100101 110010

110010100101 110010100101 110010

Active ActiveActive

Page 9: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Database Mirroring• Hot standby protects against database or server failure• Two separate copies of data• SQL Server 2008 R2 compresses the log stream from

principal server to mirror server• Automatic recovery from page corruption• SQL Server 2008 R2 supports

• rolling upgrades of mirrored• database configurations

• High Availability (HA Soln.)• RPO: 100%• RTO: Seconds (with witness)

• High Performance (DR Soln.)• RPO: Seconds• RTO: Manual

Principal Mirror

Client

Witness

Page 10: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Enhanced Database Mirroring

“This is a really powerful enhancement because prior to this… you would have to run DBCC CHECKDB... and that would likely mean taking downtime… With SQL Server 2008 Database Mirroring you can avoid the effort and downtime.”

— Glenn Berry, Database Architect, NewsGator Technologies

Applications & Business Logic

Principal Mirror

High Performance Mirroring Increase performance through

asynchronous mirroring

Automatic Page Repair Automatically detects page

corruption and retrieves data from the mirror

Reduces downtime and management costs

Minimizes application changes to correctly handle I/O errors

Reporting from Mirror Increase utilization of mirror

server Reduce need for reporting servers

Page 11: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Peer-to-Peer Replication

“[Microsoft] SQL Server 2008 replication proved to be very predictable and reliable in our testing. This helps us to create flexible and scalable replication solutions. Reliability must be at the foundation of all that we do.”

— Sergey Elchinsky, Leading System Engineer, Baltika Breweries

Applications & Business Logic 1100101

001011001011001011001

01

110010100101

110010100101

110010

110010100101

110010100101

110010

110010100101

110010100101

110010

• Increases reliability by replicating data to multiple servers

• Provides higher availability in case of failure or to allow maintenance at any of the participating nodes

• Offers improved performance for each node with geo-scale architecture

• Add and remove servers easily without taking replication offline, by using the new topology wizard

• You deal with conflicts.

• Consider issues with triggers etc

Page 12: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Live Migration in Hyper-V™• Move running instances of

virtual machines between host servers

• Virtual machines can be moved for maintenance or to balance workloads on host servers

• Perform maintenance on physical machines without any downtime

• Requires Windows Server 2008 R2 Hyper-V

• In itself not an HA solution but could be combined with clustering“This server already runs on our cluster solution with high availability, but after

we have tested live migration on the new hardware, we’ll move it over to ensure optimal performance and reliability.”

—Rodrigo Immaginario, IT Manager, Universidade Vila Velha

Virtual Servers

Host Server

Applications & Business Logic

110010100101

110010100101

110010

110010100101

110010100101

110010

Host Server

110010100101

110010100101

110010

110010100101

110010100101

110010

110010100101

110010100101

110010

110010100101

110010100101

110010

110010100101

110010100101

110010

110010100101

110010100101

110010

Virtual Server

Page 13: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Online Operations• Allow routine maintenance

without downtime

• Online index operations

• Online page and file restoration

• Online configuration of peer-to-peer nodes

• Users and applications can access data while the table, key, or index is being updated

“We recommend performing online index operations for business environments that operate 24 hours a day, seven days a week, in which the need for concurrent user activity during index operations is vital.”

— SQL Server Books Online

Applications & Business Logic

IndexTable

7

110010100101 110010100101 110010

0

2345

15

2340

15

4270

Deleted

3

5

110010100101 110010100101 110010

6

Deleted

IndexTable0

34

Deleted

7

56

Deleted

Page 14: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Database Snapshots• Provide a read-only static

view of the database at a point in time

• Revert databases to a point in time before user error

• Data loss is limited to changes after the snapshot

• Run reports from a snapshot created on the mirror server in a database mirroring session to better utilize resources

“Database snapshots allow you to create read-only databases for reporting and can also be useful in your data recovery efforts in the event of a disaster.”

—Tim Chapman, SQL Server Database Administrator

Snapshot Source

110010100101 110010100101 110010

Applications & Business Logic

110010100101 110010100101 110010

110010100101 110010100101 110010

Page 15: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

Putting It All Together

Database mirroring

Logical recoverystandby

Log shipping

Log shipping with restore delay

Productiondatabase

Replication

Clustering

Database Mirroring Primary disaster site

for databases

Failover Clustering Local server

redundancy

Replication Database reporting

and read scale-out with redundancy

Log Shipping Additional disaster

sites for databases Logical recovery

Warmstandby

Hotstandby

Backup

Database Scale- out for queries

Page 16: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

SQL Server “Denali” AlwaysOn

Increase flexibility with new, integrated HADR solution• Faster failover, easier administration with

Availability Groups

• Identify databases to failover as a unit to reduce unplanned downtime

• Faster application failover using virtual name

• Increase application uptime using flexible failover policy

• Enable better data redundancy and protection with up to four secondaries and up to two synchronous secondaries

• Limited downtime with enhanced online operations

• Run Microsoft SQL Server® on Windows Server® Core to reduce planned downtime (50-60% fewer OS patch reboots)

A

A

Disaster Recovery

A

Non-Shared Storage

A

A

A

AA A

Shared Storage

Page 17: Keith Burns Microsoft UK Keith.burns@microsoft.com Mission Critical Database

© 2008 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.