SlideShare a Scribd company logo
1 of 12
Download to read offline
Implementing SQLServer AlwaysON
Sarabpreet Singh Anand
SQL Server – MVP
MS – Webcast 15th May 2013
Sarabpreet Singh Anand
 SQL Server MVP
 MCTS, MCITP: Admin, MCT certifications
 Vice President & Regional Mentor SQLServerGeeks.com
 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 : sarab@sarabpreet.com
 sarabpreet.anand@gmail.com
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 Secondaries
Agenda
• 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 Possible
Limitations in DB Mirroring & Log Shipping
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 Installation
Service
All participating DBs should be in Full Recovery model
with minimum of One Full backup.
Shared Folder*
What is required to configure AlwaysON
Implementation
• Multiple DBs
• Sync & Async
• Multiple DBs can Failover
together
• AutomaticManual Failover
• Transparent App Failover
Configuration
• Multiple Secondary
• Upto 4 Replicas
• Upto 3 Sync
• Upto 2 Automatic Failover
• Automatically creates a
Listener
• 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 upto
100 DBs on an Instance.
Benefits of AlwaysON
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-AG2
using Listener
 WSFC notify all secondary replicas
 Secondaries reconnect to the new primary replicas
mirroring endpoint and synchronization resumes
AvailabilityGroup
Listener
Topology Examples
A
A
Direct attached storage local, regional and geo secondaries
A
A
Synchronous
data movement
Asynchronous
data movement
Client connects to the Availability Group
Listener
 Standard connections are routed to the
Primary server for read/write operations
 ReadOnly connections are routed to a
readable secondary based on ReadOnly
routing configuration
Readable secondary
Readonly routing
AvailabilityGroup
Listener
 Backups can be done on any replica of a database to
offload I/O from primary replica
 Transaction log backups, plus COPY_ONLY full backups
 Backup jobs can be configured on all replicas and
preferences set so that a job only runs on the preferred
replica at that time
 This means no script/job changes are required after a failover
 Transaction log backups done on all replicas form a single
log chain
Readable Secondary
Offloading Backups To a Secondary
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
Thank you 
Request you to provide your valuable feedback @ http://feedback.sarabpreet.com
Speaker Contact Info:
Twitter: @Sarab_SQLGeek
Email: Sarab@Sarabpreet.com
Sarabpreet.anand@gmail.com

More Related Content

What's hot

SQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability GroupsSQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability Groups
Edwin M Sarmiento
 
Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groups
Edwin M Sarmiento
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
Michael Noel
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
James Bayer
 

What's hot (20)

SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)
 
Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...
 
Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...
Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...
Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 
Sql server 2012 AlwaysOn
Sql server 2012 AlwaysOnSql server 2012 AlwaysOn
Sql server 2012 AlwaysOn
 
SQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability GroupsSQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability Groups
 
Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groups
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Alwayson AG enhancements
Alwayson AG enhancementsAlwayson AG enhancements
Alwayson AG enhancements
 
Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014Configuring sql server - SQL Saturday, Athens Oct 2014
Configuring sql server - SQL Saturday, Athens Oct 2014
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
 
Oracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration IOracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration I
 
Weblogic server cluster
Weblogic server clusterWeblogic server cluster
Weblogic server cluster
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
WebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload ProtectionWebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload Protection
 
Weblogic
WeblogicWeblogic
Weblogic
 
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
 
Introduction to weblogic
Introduction to weblogicIntroduction to weblogic
Introduction to weblogic
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 

Similar to Implementing sql server always on

Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
webhostingguy
 
Database Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David IzahkDatabase Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David Izahk
sqlserver.co.il
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
Rishikesh Tiwari
 

Similar to Implementing sql server always on (20)

SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideSQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
 
GWAB 2015 - Data Plaraform
GWAB 2015 - Data PlaraformGWAB 2015 - Data Plaraform
GWAB 2015 - Data Plaraform
 
Using Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” serviceUsing Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” service
 
Effective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database MirroringEffective Usage of SQL Server 2005 Database Mirroring
Effective Usage of SQL Server 2005 Database Mirroring
 
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
 
Database Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David IzahkDatabase Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David Izahk
 
Continuent Tungsten - Scalable Saa S Data Management
Continuent Tungsten - Scalable Saa S Data ManagementContinuent Tungsten - Scalable Saa S Data Management
Continuent Tungsten - Scalable Saa S Data Management
 
Database and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on AzureDatabase and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on Azure
 
Design, Deploy, and Optimize SQL Server on AWS - June 2017 AWS Online Tech Talks
Design, Deploy, and Optimize SQL Server on AWS - June 2017 AWS Online Tech TalksDesign, Deploy, and Optimize SQL Server on AWS - June 2017 AWS Online Tech Talks
Design, Deploy, and Optimize SQL Server on AWS - June 2017 AWS Online Tech Talks
 
Design, Deploy, and Optimize SQL Server on AWS - AWS Online Tech Talks
Design, Deploy, and Optimize SQL Server on AWS - AWS Online Tech TalksDesign, Deploy, and Optimize SQL Server on AWS - AWS Online Tech Talks
Design, Deploy, and Optimize SQL Server on AWS - AWS Online Tech Talks
 
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
Webinar Slides: High Noon at AWS — Amazon RDS vs. Tungsten Clustering with My...
 
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018 Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
 
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
Marketing Automation at Scale: How Marketo Solved Key Data Management Challen...
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft Workloads
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
 
Sql disaster recovery
Sql disaster recoverySql disaster recovery
Sql disaster recovery
 
Migration of Microsoft Workloads
Migration of Microsoft WorkloadsMigration of Microsoft Workloads
Migration of Microsoft Workloads
 
MariaDB High Availability
MariaDB High AvailabilityMariaDB High Availability
MariaDB High Availability
 
[JSS2015] AlwaysOn 2016
[JSS2015] AlwaysOn 2016[JSS2015] AlwaysOn 2016
[JSS2015] AlwaysOn 2016
 
Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019Azure SQL Managed Instance - SqlBits 2019
Azure SQL Managed Instance - SqlBits 2019
 

Recently uploaded

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Implementing sql server always on

  • 1. Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP MS – Webcast 15th May 2013
  • 2. Sarabpreet Singh Anand  SQL Server MVP  MCTS, MCITP: Admin, MCT certifications  Vice President & Regional Mentor SQLServerGeeks.com  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 : sarab@sarabpreet.com  sarabpreet.anand@gmail.com
  • 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 Secondaries Agenda
  • 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 Possible Limitations in DB Mirroring & Log Shipping
  • 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 Installation Service All participating DBs should be in Full Recovery model with minimum of One Full backup. Shared Folder* What is required to configure AlwaysON
  • 6. Implementation • Multiple DBs • Sync & Async • Multiple DBs can Failover together • AutomaticManual Failover • Transparent App Failover Configuration • Multiple Secondary • Upto 4 Replicas • Upto 3 Sync • Upto 2 Automatic Failover • Automatically creates a Listener • 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 upto 100 DBs on an Instance. Benefits of AlwaysON
  • 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-AG2 using Listener  WSFC notify all secondary replicas  Secondaries reconnect to the new primary replicas mirroring endpoint and synchronization resumes AvailabilityGroup Listener
  • 8. Topology Examples A A Direct attached storage local, regional and geo secondaries A A Synchronous data movement Asynchronous data movement
  • 9. Client connects to the Availability Group Listener  Standard connections are routed to the Primary server for read/write operations  ReadOnly connections are routed to a readable secondary based on ReadOnly routing configuration Readable secondary Readonly routing AvailabilityGroup Listener
  • 10.  Backups can be done on any replica of a database to offload I/O from primary replica  Transaction log backups, plus COPY_ONLY full backups  Backup jobs can be configured on all replicas and preferences set so that a job only runs on the preferred replica at that time  This means no script/job changes are required after a failover  Transaction log backups done on all replicas form a single log chain Readable Secondary Offloading Backups To a Secondary
  • 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. Thank you  Request you to provide your valuable feedback @ http://feedback.sarabpreet.com Speaker Contact Info: Twitter: @Sarab_SQLGeek Email: Sarab@Sarabpreet.com Sarabpreet.anand@gmail.com