Implementing sql server always on


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Implementing sql server always on

  1. 1. Implementing SQLServer AlwaysONSarabpreet Singh AnandSQL Server – MVPMS – Webcast 15th May 2013
  2. 2. Sarabpreet Singh Anand SQL Server MVP MCTS, MCITP: Admin, MCT certifications Vice President & Regional Mentor Expert in handling VLDBs & Disaster Management Conducted many SQL Server Boot camp Trainings across India Regular Speaker: UG Events, In-person Events & Webcasts Microsoft Community Tech Days (CTD),Etc Follow Me @Sarab_SQLGeek Email :
  3. 3. Why AlwaysONWhat is required to configure AlwaysONBenefits of AlwaysONHow AlwaysON worksDiff. TopologiesReadable SecondaryBackup on SecondaryDemo How to implementConfigure AlwaysON Backups on Secondary Readable SecondariesAgenda
  4. 4. • Implement for Each DB• Either SyncAync – DBM• Single mirror DB Possible in DBM• DB Failover• Single DB• No Automatic – LS• Need Witness for Automatic Failover– DBM• Application Failover• Not So Easy – LS• With PartnerFailover Value – DBM• ReportingBackup• Reporting – just a workaround – also for limited time only• No Backup PossibleLimitations in DB Mirroring & Log Shipping
  5. 5. Windows Failover ClusterSQL Server 2012 EnterpriseDeveloperEvaluation EditionAll Nodes should be part of the same domain.Static IP for Listener (a DHCP also Works but….)*Same Drive Letters on all Nodes otherwise....*AlwaysON should be enabled on each SQL InstallationServiceAll participating DBs should be in Full Recovery modelwith minimum of One Full backup.Shared Folder*What is required to configure AlwaysON
  6. 6. Implementation• Multiple DBs• Sync & Async• Multiple DBs can Failovertogether• AutomaticManual Failover• Transparent App FailoverConfiguration• Multiple Secondary• Upto 4 Replicas• Upto 3 Sync• Upto 2 Automatic Failover• Automatically creates aListener• Use Secondary for reporting• Use Secondary for Backups• Mix SyncAsync• Builtin Compression• Builtin Encryption• Shared & Non Shared Disk• Creates Auto Stats for Secondary• Upto 10 AGs and in total upto100 DBs on an Instance.Benefits of AlwaysON
  7. 7. How AlwaysON Work Clients connect to primary replica using Listener A failover is initiated SQL-AG1 confirms failover and informs WSFC Bring SQL-AG1 offline Clients are disconnected Brings SQL-AG2 online AG & Listener resource moves to SQL-AG2 Clients are automatically redirected to SQL-AG2using Listener WSFC notify all secondary replicas Secondaries reconnect to the new primary replicasmirroring endpoint and synchronization resumesAvailabilityGroupListener
  8. 8. Topology ExamplesAADirect attached storage local, regional and geo secondariesAASynchronousdata movementAsynchronousdata movement
  9. 9. Client connects to the Availability GroupListener Standard connections are routed to thePrimary server for read/write operations ReadOnly connections are routed to areadable secondary based on ReadOnlyrouting configurationReadable secondaryReadonly routingAvailabilityGroupListener
  10. 10.  Backups can be done on any replica of a database tooffload I/O from primary replica Transaction log backups, plus COPY_ONLY full backups Backup jobs can be configured on all replicas andpreferences set so that a job only runs on the preferredreplica at that time This means no script/job changes are required after a failover Transaction log backups done on all replicas form a singlelog chainReadable SecondaryOffloading Backups To a Secondary
  11. 11. Let’s see how to How to Implement AlwaysON How to Failover AlwaysON Dashboard How to Configure Backups on Secondaries Readable Secondaries Test Readable Routing Listener Add DB to same AlwaysON Group
  12. 12. Thank you Request you to provide your valuable feedback @ http://feedback.sarabpreet.comSpeaker Contact Info:Twitter: @Sarab_SQLGeekEmail: