virtual techdays india │ 28-30 september 2011 high availability - a story from past to future...

31
virtual techdays INDIA 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani Technical Lead – SQL Support, Microsoft [email protected] | http://SQLServer-Help.com |

Post on 21-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

High Availability - A Story from Past to Future

Balmukund Lakhani │ Technical Lead – SQL Support, [email protected] | http://SQLServer-Help.com |

Page 2: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

A B O U T M E…

• Working with SQL Technology since 2001 (almost 10 years)• Currently working as Technical Lead with Microsoft SQL Support team• Premier Field Engineer @ Microsoft• ERP Onsite Support @ Ramco Systems• DBA @ Ramco Systems• Developer @ Ramco Systems

• Team Blog – http://blogs.msdn.com/SQLServerFAQ • Personal Blog – http://SQLServer-Help.com • Active Participant in MSDN SQL Forums.

Page 3: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

Why High Availability? The Past… Quick Recap

Log-Shipping Database Mirroring Failover Clustering Replication Database Snapshot

The Future… In Depth High Availability and Disaster Recovery Solution in SQL Server “Denali”

virtual techdaysINDIA │ 28-30 September 2011

S E S S I O N A G E N D A

Page 4: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Why High Availability?

Page 5: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Mission Critical High Availability Solution

Meets mission critical high

availability SLAIntegrated EfficientFlexible

RPO and RTO requirements

Planned and unplanned downtime

Local HA anddisaster recovery

A unified, simplifiedsolution

Easy to deploy andManage

Cost EffectiveHA hardware

UtilizationNo idle systems

Improve IT efficiency

Reuse existing investment

SAN vs.. DAS environments

Page 6: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

High Availability Solutions… The past !

Page 7: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

L O G – S H I P P I N G

Copy

Copy

Copy

Perform Backups

Copy and Restore Backups

RaiseAlerts

Primary Database

Secondary Database

Secondary Database

Secondary Database

Copy and Restore Backups

Copy and Restore Backups

Page 8: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

DATABASE MIRRORING

MirrorPrincipal

Witness

Log

Application

SQL Server SQL Server

2

2

4

51

Data DataLog

3>2 >3

Mirror is always redoing – it remains currentCommit

Page 9: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

O T H E R T E C H O N O L I G E Svirtual techdays

INDIA │ 28-30 September 2011

Page 10: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

O T H E R T E C H O N O L I G E S• Replication• Database Snapshots• Failover Clustering

Page 11: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

E X I S T I N G T O P O L O G Yvirtual techdays

INDIA │ 28-30 September 2011

Log Shipping

Database Mirroring

Page 12: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

High Availability Solutions… The Future!

Page 13: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

AlwaysOn Availability Groups (Future of High Availability)• AlwaysOn Availability Groups is a new feature that enhances and combines database mirroring

and log shipping capabilities

Multi-database failover Multiple secondaries

Total of 4 secondaries synchronous secondaries

1 automatic failover pair Synchronous and asynchronous

data movement Built in compression and

encryption Automatic and manual failover Flexible failover policy Automatic Page Repair

Application failover using virtual name

Configuration Wizard Dashboard System Center Integration Rich diagnostic

infrastructure File-stream replication Replication publisher

failover

Flexible Integrated Efficient Active Secondary

Readable Secondary

Backup from Secondary

Automation using power-shell

Page 14: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Demo – Setting up AlwaysOn

Configure AlwaysOn Availability Group

Page 15: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

What we did in demo?• Replace Database Mirroring and Log Shipping with Availability Group• Advantages:

– One integrated solution for HA and DR– Groups of databases failing over together– Multiple secondaries– Listener for Client Connectivity– Backup on secondary– Readable secondary

• Restrictions:– No delayed apply on the secondary

Page 16: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

P r e – r e q u i s i t e s• All SQL servers (including the secondary in the DR site) in the same Windows domain.• One Windows Server Failover Cluster spreads over the primary and DR sites• All the databases must be in FULL recovery model• To create WFSC cluster user running creation must have:

– Domain account– Administrator on all machines– Have Create Computer objects and Read All Properties rights in AD– Detailed Article: http://technet.microsoft.com/en-us/library/cc731002(WS.10).aspx

• KB 976097– Supports SQL Server Failover Cluster Instances with AlwaysOn Availability Groups

• KB 2494036– Supports configuring optimal quorum with non-automatic failover targets

Page 17: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

A

A

A

virtual techdaysINDIA │ 28-30 September 2011

N E W T O P O L O G Y

Page 18: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

N E W T O P O L O G Y A D V A N T A G E• Better SLAs

– Multiple no data loss secondaries– Better data loss protection for DR secondaries through continuous replication– Faster failover to DR secondaries through virtual name failover

• Easier deployment/management– Unified solution– Simple deployment– Unified dashboard– Rich diagnostics– Centralized management of client connection topology– Multi-DB failover

Page 19: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

SQL Server AlwaysOn – BoS (Backup on Secondary)

Page 20: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Database Mirroring Backups• Backups are only allowed on Primary• Secondary cannot be leveraged for backups• Backup Workload impacts production Server

Page 21: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Active Secondary: Offloading Backup• Backups are allowed on any replica.

– Synchronous or asynchronous secondaries– Primary backups still work

• Backup workload does not impact production server.• Highly requested feature.• Log backups done on all replicas form a single log chain• Recovery Advisor makes restores simple

Page 22: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Restrictions, cautions, and gotchas• Differential backups are not supported on secondary

• Only Copy-only full backups are supported on secondary– The only distinction is the differential bitmap clearing

• Advisable for backups to be stored centrally

Page 23: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Demo - Backup on Secondary

Backup on Secondary &Use them to create new Replica

Page 24: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

SQL Server AlwaysOn – Readable Secondary

Page 25: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Readable Secondary

DB2DB1

SQLServr.exe SQLServr.exe

InstanceA

DB2DB1

Primary Secondary

Database Log Synchronization

InstanceB

Reports

Page 26: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Readable Secondary Data Latency

Log Cache

Log Cache

DB1

DB1 Log

DB1

Primary Replica

Log Capture Log Recieve

DB1 Data

Network

Redo Thread

Redo Pages

DB1 Log

Page Updated

Log Harden

Log Flush

Commit

Acknowledge Commit

Log Pool

DB1 Data

Page 27: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

Demo – Readable Secondary

Reading Data From Secondary &Creating Secondary Routing

Page 28: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

A

A

A

A

virtual techdaysINDIA │ 28-30 September 2011

Reports

Backups

Synchronous Data Movement

Asynchcronous Data Movement

F i n a l T o p o l o g y

Page 29: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

S U M M A R Y

• SQL Server AlwaysOn is a comprehensive high availability solution

• Better application availability,

• Higher return on investment and

• Simplified deployment and management

• AlwaysOn Availability Group provide flexibility in HA configuration

Page 30: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysINDIA │ 28-30 September 2011

RELATED CONTENT in VTD Sep 29th 2011 – DBA Track Monitoring Performance in Cloud for SQL Azure Applications

Vinod Kumar 3:00pm - 4:00pm

Managing SQL Server Made Easy - Features and Concepts Amit Banerjee 4:15pm - 5:15pm

Page 31: Virtual techdays INDIA │ 28-30 September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft

virtual techdaysTHANKS│28-30 September 2011

Please do give your Feedback, Complete evaluation at the end of this session. You could also write to be at :

[email protected] │ http://twitter.com/blakhani