virtual techdays india │ 28-30 september 2011 high availability - a story from past to future...
Post on 21-Dec-2015
214 views
TRANSCRIPT
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 |
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.
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
virtual techdaysINDIA │ 28-30 September 2011
Why High Availability?
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
virtual techdaysINDIA │ 28-30 September 2011
High Availability Solutions… The past !
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
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
O T H E R T E C H O N O L I G E Svirtual techdays
INDIA │ 28-30 September 2011
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
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
virtual techdaysINDIA │ 28-30 September 2011
High Availability Solutions… The Future!
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
virtual techdaysINDIA │ 28-30 September 2011
Demo – Setting up AlwaysOn
Configure AlwaysOn Availability Group
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
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
A
A
A
virtual techdaysINDIA │ 28-30 September 2011
N E W T O P O L O G Y
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
virtual techdaysINDIA │ 28-30 September 2011
SQL Server AlwaysOn – BoS (Backup on Secondary)
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
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
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
virtual techdaysINDIA │ 28-30 September 2011
Demo - Backup on Secondary
Backup on Secondary &Use them to create new Replica
virtual techdaysINDIA │ 28-30 September 2011
SQL Server AlwaysOn – Readable Secondary
virtual techdaysINDIA │ 28-30 September 2011
Readable Secondary
DB2DB1
SQLServr.exe SQLServr.exe
InstanceA
DB2DB1
Primary Secondary
Database Log Synchronization
InstanceB
Reports
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
virtual techdaysINDIA │ 28-30 September 2011
Demo – Readable Secondary
Reading Data From Secondary &Creating Secondary Routing
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
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
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
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