SlideShare a Scribd company logo
th
EVENT
CHAPTER
Tips to Install and Manage
AlwaysOn Availability
Groups
in SQL Server 2012 & 2014Antonios Chatzipavlis
SQLschool.gr Founder, Principal Consultant
SQL Server Evangelist, MVP on SQL Server
Apr 30, 2015
3
I have been started with computers.
I started my professional carrier in computers industry.
I have been started to work with SQL Server version 6.0
I earned my first certification at Microsoft as Microsoft Certified Solution
Developer (3rd in Greece) and started my carrier as Microsoft Certified
Trainer (MCT) with more than 20.000 hours of training until now!
I became for first time Microsoft MVP on SQL Server
I created the SQL School Greece (www.sqlschool.gr)
I became MCT Regional Lead by Microsoft Learning Program.
I was certified as MCSE : Data Platform, MCSE: Business Intelligence
Antonios Chatzipavlis
Database Architect
SQL Server Evangelist
MCT, MCSE, MCITP, MCPD, MCSD, MCDBA,
MCSA, MCTS, MCAD, MCP, OCA, ITIL-F
1982
1988
1996
1998
2010
2012
2013
CHAPTER
Follow us in social media
Twitter @antoniosch / @sqlschool
Facebook fb/sqlschoolgr
YouTube yt/user/achatzipavlis
LinkedIn SQL School Greece group
Pinterest pi/SQLschool/
help@sqlschool.gr
• Understanding AlwaysOn Availability Groups
• Availability Modes
• Active Secondary Replicas
• Failover options in an AlwaysOn Availability Group
• Flexible Failover Policies
• Enhancements to AlwaysOn AG in SQL Server 2014
• Pre-Requisites for Using AlwaysOn Availability Groups
• Pre-Installation Tasks
• Installation Scenarios
Agenda
Understanding AlwaysOn Availability Groups
Primary
Replica
Active secondary
Replica
Windows Server Failover Cluster
Availability
Group Listener
Read/write Read only
• Synchronous-commit mode
• Primary replica sends transaction log changes to a secondary replica
• Secondary replica applies the changes in the log to its copy of the database,
and then sends an acknowledgement to the primary replica
• Primary replica commits the transaction
• Asynchronous-commit mode
• Primary replica sends transaction log changes to a secondary replica and
then commits the transaction
• Secondary replica applies the changes in the log to its copy of the database
Availability Modes
• Offload workload to secondaries for improved performance
and better resource utilization
• Using secondary replicas for read access
• Read-intent connections
• Any read-only connection
• Using secondary replicas for backups
• Log backups
• Copy backups
Active Secondary Replicas
• Automatic failover
• No data loss
• Planned manual failover
• No data loss
• Forced manual failover
• Possible data loss
• Use the Start Failover Wizard to initiate manual failover
Failover options in an AlwaysOn Availability Group
• Health check time-out threshold defines the frequency of health
checks on the primary replica
• sp_server_diagnostics stored procedure performs health checks
• Failover condition levels
• Level one – On server failure
• Level two – On server unresponsive
• Level three – On critical server error
• Level four – On moderate server error
• Level five – On any qualified failure conditions
• Use the ALTER AVAILABILITY GROUP Transact-SQL statement or
PowerShell to configure the flexible failover policy
Flexible Failover Policies
• Maximum number of secondary replicas increased to eight
• Improved availability for read-only workloads
• Easier interoperability with Microsoft Azure
• Improved troubleshooting and diagnostics
Enhancements to AlwaysOn AG in SQL Server 2014
• Windows Server version
• Active Directory
• Nodes must be domain members
• Nodes cannot be domain controllers
• Windows Server Failover Cluster
• One replica per Availability Group per node
• Some configurations may require hotfixes
Pre-Requisites for Using AlwaysOn Availability Groups
• Install the Windows Server Failover Clustering on all servers that will be nodes in
the cluster
• Create a Windows Server Failover Cluster
• Install a stand-alone instance of SQL Server on each node
• Enable the AlwaysOn Availability Groups feature on each SQL Server instance
• Create a file share to share the backups
• Install the databases on the SQL Server instance that will be the primary replica
• Perform a full backup of each database and place the backups in the file share
Pre-Installation Tasks
Installation Scenarios
• Enable AlwaysOn High Availability on
the existing FCI instance
• Add the Failover Clustering feature to
node (SA_1) that is located in the
secondary data center that you are
planning to add to the High Availability
solution.
• Add the SA_1 node to the existing
WSFC in the primary datacenter
• This node should not be part of your
Failover Cluster Instance
Failover Cluster in Primary and AG in Secondary Data Center
Failover Cluster in Primary and AG on a Failover Cluster in Secondary
• Always put services account to Kerberos using Setspn
• Create AG using a dummy database
• Create listener in a separate step
• To minimize down time proceed with manual restores
• Check the number of VLFs on AG Databases
• Set the same memory on AG Nodes in case of disaster
• Don’t forget to move SQL Logins
• Don’t forget to move Jobs and Alerts
Tips from the battle field
Thank you
SELECT
KNOWLEDGE
FROM
SQL SERVER
http://www.sqlschool.gr
Copyright © 2015 SQL School Greece

More Related Content

PPTX
Sql server 2012 ha dr 24_hop_final
PDF
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
PPTX
Sql server’s high availability technologies
PDF
SQL Server High Availability Solutions (Pros & Cons)
PDF
Configuring sql server - SQL Saturday, Athens Oct 2014
PDF
Pre and post tips to installing sql server correctly
PPTX
Sql server 2012 - always on deep dive - bob duffy
PDF
Implementing sql server always on
Sql server 2012 ha dr 24_hop_final
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
Sql server’s high availability technologies
SQL Server High Availability Solutions (Pros & Cons)
Configuring sql server - SQL Saturday, Athens Oct 2014
Pre and post tips to installing sql server correctly
Sql server 2012 - always on deep dive - bob duffy
Implementing sql server always on

What's hot (20)

PPTX
Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...
PPTX
Sql 2012 always on
PPTX
SQL Server 2016 AlwaysOn Availability Groups New Features
PPTX
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
PPTX
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
PPTX
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
PPTX
Alwayson AG enhancements
PPTX
AlwaysON Basics
PDF
SQL Server 2012 High Availability with AlwaysOn Availability Groups
PPTX
Always on in SQL Server 2012
PPTX
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
PPTX
Sql server 2012 AlwaysOn
PPTX
SQL Server Clustering Part1
PDF
Troubleshooting sql server
PDF
Sql server 2014 online operations
PDF
SQL Server Clustering and High Availability
PPTX
Microsoft Azure, My First IaaS
PPTX
End-to-end Troubleshooting Checklist for Microsoft SQL Server
PPTX
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
PDF
SQL Server Clustering for Dummies
Configurando Aplicaciones para Réplicas de Lectura de SQL-Server AlwaysOn - C...
Sql 2012 always on
SQL Server 2016 AlwaysOn Availability Groups New Features
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
Alwayson AG enhancements
AlwaysON Basics
SQL Server 2012 High Availability with AlwaysOn Availability Groups
Always on in SQL Server 2012
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
Sql server 2012 AlwaysOn
SQL Server Clustering Part1
Troubleshooting sql server
Sql server 2014 online operations
SQL Server Clustering and High Availability
Microsoft Azure, My First IaaS
End-to-end Troubleshooting Checklist for Microsoft SQL Server
SPSSac2014 - SharePoint Infrastructure Tips and Tricks for On-Premises and Hy...
SQL Server Clustering for Dummies
Ad

Viewers also liked (15)

PPTX
Always on les solutions de haute disponibilité avec sql server 2012 (dat302)
PPTX
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
PDF
Microsoft SQL Server always on solutions guide for high availability and dis...
PPTX
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
PPTX
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
PPTX
JSS2014 – Infrastructure et Always-On
PPTX
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
PPTX
Sacándole provecho a MS SQL Server 2012 FileTable para la gestión de datos en...
PPT
SQL- Introduction to PL/SQL
DOCX
58961174 case-study-on-sql-server-high-availability-and-disaster-recovery
PPTX
Tout sur les solutions de haute disponibilité et disaster recovery de sql ser...
PPTX
Tout sur les solutions de Haute Disponibilité et Disaster Recovery de SQL Ser...
PPTX
Configuración y casos de uso para AlwaysON availability groups readable secon...
PPTX
Breaking Down and Understanding Office 365 - SPSJHB 2015
PPTX
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
Always on les solutions de haute disponibilité avec sql server 2012 (dat302)
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
Microsoft SQL Server always on solutions guide for high availability and dis...
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
JSS2014 – Infrastructure et Always-On
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
Sacándole provecho a MS SQL Server 2012 FileTable para la gestión de datos en...
SQL- Introduction to PL/SQL
58961174 case-study-on-sql-server-high-availability-and-disaster-recovery
Tout sur les solutions de haute disponibilité et disaster recovery de sql ser...
Tout sur les solutions de Haute Disponibilité et Disaster Recovery de SQL Ser...
Configuración y casos de uso para AlwaysON availability groups readable secon...
Breaking Down and Understanding Office 365 - SPSJHB 2015
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
Ad

Similar to Tips to install and manage always on availability groups in sql server 2012 & 2014 (20)

PDF
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
PPTX
Sql server 2019 New Features by Yevhen Nedaskivskyi
PPTX
Windows 2012 R2 Multi Server Management
PPT
Effective Usage of SQL Server 2005 Database Mirroring
PDF
Migrate SQL Workloads to Azure
PPTX
.NET microservices with Azure Service Fabric
PDF
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
PDF
Sql server 2012 autoexec event no 39
PDF
Getting to Walk with DevOps
PDF
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
PDF
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
PDF
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
PPTX
Chef andwindows reactor
PPTX
SQL Server Upgrade and Consolidation - Methodology and Approach
PDF
MySQL The State of the Dolphin - jun15
PDF
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
PDF
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
PDF
VMworld 2013: Virtualizing Highly Available SQL Servers
PPTX
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
PPTX
Haute Disponibilité et Reprise sur incidents en SharePoint 2013 avec Sql Serv...
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
Sql server 2019 New Features by Yevhen Nedaskivskyi
Windows 2012 R2 Multi Server Management
Effective Usage of SQL Server 2005 Database Mirroring
Migrate SQL Workloads to Azure
.NET microservices with Azure Service Fabric
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Sql server 2012 autoexec event no 39
Getting to Walk with DevOps
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
Chef andwindows reactor
SQL Server Upgrade and Consolidation - Methodology and Approach
MySQL The State of the Dolphin - jun15
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
VMworld 2013: Virtualizing Highly Available SQL Servers
haute Disponibilité et reprise sur incident dans SharePoint avec groupes de d...
Haute Disponibilité et Reprise sur incidents en SharePoint 2013 avec Sql Serv...

More from Antonios Chatzipavlis (20)

PPTX
Data virtualization using polybase
PDF
SQL server Backup Restore Revealed
PDF
Machine Learning in SQL Server 2019
PDF
Workload Management in SQL Server 2019
PDF
Loading Data into Azure SQL DW (Synapse Analytics)
PDF
Introduction to DAX Language
PDF
Building diagnostic queries using DMVs and DMFs
PDF
Exploring T-SQL Anti-Patterns
PDF
Designing a modern data warehouse in azure
PDF
Modernizing your database with SQL Server 2019
PDF
Designing a modern data warehouse in azure
PDF
SQLServer Database Structures
PDF
Sqlschool 2017 recap - 2018 plans
PDF
Microsoft SQL Family and GDPR
PDF
Statistics and Indexes Internals
PDF
Introduction to Azure Data Lake
PDF
Azure SQL Data Warehouse
PDF
Introduction to azure document db
PDF
Introduction to Machine Learning on Azure
PDF
Introduction to sql database on azure
Data virtualization using polybase
SQL server Backup Restore Revealed
Machine Learning in SQL Server 2019
Workload Management in SQL Server 2019
Loading Data into Azure SQL DW (Synapse Analytics)
Introduction to DAX Language
Building diagnostic queries using DMVs and DMFs
Exploring T-SQL Anti-Patterns
Designing a modern data warehouse in azure
Modernizing your database with SQL Server 2019
Designing a modern data warehouse in azure
SQLServer Database Structures
Sqlschool 2017 recap - 2018 plans
Microsoft SQL Family and GDPR
Statistics and Indexes Internals
Introduction to Azure Data Lake
Azure SQL Data Warehouse
Introduction to azure document db
Introduction to Machine Learning on Azure
Introduction to sql database on azure

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
20250228 LYD VKU AI Blended-Learning.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity

Tips to install and manage always on availability groups in sql server 2012 & 2014

  • 1. th EVENT CHAPTER Tips to Install and Manage AlwaysOn Availability Groups in SQL Server 2012 & 2014Antonios Chatzipavlis SQLschool.gr Founder, Principal Consultant SQL Server Evangelist, MVP on SQL Server Apr 30, 2015 3
  • 2. I have been started with computers. I started my professional carrier in computers industry. I have been started to work with SQL Server version 6.0 I earned my first certification at Microsoft as Microsoft Certified Solution Developer (3rd in Greece) and started my carrier as Microsoft Certified Trainer (MCT) with more than 20.000 hours of training until now! I became for first time Microsoft MVP on SQL Server I created the SQL School Greece (www.sqlschool.gr) I became MCT Regional Lead by Microsoft Learning Program. I was certified as MCSE : Data Platform, MCSE: Business Intelligence Antonios Chatzipavlis Database Architect SQL Server Evangelist MCT, MCSE, MCITP, MCPD, MCSD, MCDBA, MCSA, MCTS, MCAD, MCP, OCA, ITIL-F 1982 1988 1996 1998 2010 2012 2013 CHAPTER
  • 3. Follow us in social media Twitter @antoniosch / @sqlschool Facebook fb/sqlschoolgr YouTube yt/user/achatzipavlis LinkedIn SQL School Greece group Pinterest pi/SQLschool/
  • 5. • Understanding AlwaysOn Availability Groups • Availability Modes • Active Secondary Replicas • Failover options in an AlwaysOn Availability Group • Flexible Failover Policies • Enhancements to AlwaysOn AG in SQL Server 2014 • Pre-Requisites for Using AlwaysOn Availability Groups • Pre-Installation Tasks • Installation Scenarios Agenda
  • 6. Understanding AlwaysOn Availability Groups Primary Replica Active secondary Replica Windows Server Failover Cluster Availability Group Listener Read/write Read only
  • 7. • Synchronous-commit mode • Primary replica sends transaction log changes to a secondary replica • Secondary replica applies the changes in the log to its copy of the database, and then sends an acknowledgement to the primary replica • Primary replica commits the transaction • Asynchronous-commit mode • Primary replica sends transaction log changes to a secondary replica and then commits the transaction • Secondary replica applies the changes in the log to its copy of the database Availability Modes
  • 8. • Offload workload to secondaries for improved performance and better resource utilization • Using secondary replicas for read access • Read-intent connections • Any read-only connection • Using secondary replicas for backups • Log backups • Copy backups Active Secondary Replicas
  • 9. • Automatic failover • No data loss • Planned manual failover • No data loss • Forced manual failover • Possible data loss • Use the Start Failover Wizard to initiate manual failover Failover options in an AlwaysOn Availability Group
  • 10. • Health check time-out threshold defines the frequency of health checks on the primary replica • sp_server_diagnostics stored procedure performs health checks • Failover condition levels • Level one – On server failure • Level two – On server unresponsive • Level three – On critical server error • Level four – On moderate server error • Level five – On any qualified failure conditions • Use the ALTER AVAILABILITY GROUP Transact-SQL statement or PowerShell to configure the flexible failover policy Flexible Failover Policies
  • 11. • Maximum number of secondary replicas increased to eight • Improved availability for read-only workloads • Easier interoperability with Microsoft Azure • Improved troubleshooting and diagnostics Enhancements to AlwaysOn AG in SQL Server 2014
  • 12. • Windows Server version • Active Directory • Nodes must be domain members • Nodes cannot be domain controllers • Windows Server Failover Cluster • One replica per Availability Group per node • Some configurations may require hotfixes Pre-Requisites for Using AlwaysOn Availability Groups
  • 13. • Install the Windows Server Failover Clustering on all servers that will be nodes in the cluster • Create a Windows Server Failover Cluster • Install a stand-alone instance of SQL Server on each node • Enable the AlwaysOn Availability Groups feature on each SQL Server instance • Create a file share to share the backups • Install the databases on the SQL Server instance that will be the primary replica • Perform a full backup of each database and place the backups in the file share Pre-Installation Tasks
  • 15. • Enable AlwaysOn High Availability on the existing FCI instance • Add the Failover Clustering feature to node (SA_1) that is located in the secondary data center that you are planning to add to the High Availability solution. • Add the SA_1 node to the existing WSFC in the primary datacenter • This node should not be part of your Failover Cluster Instance Failover Cluster in Primary and AG in Secondary Data Center
  • 16. Failover Cluster in Primary and AG on a Failover Cluster in Secondary
  • 17. • Always put services account to Kerberos using Setspn • Create AG using a dummy database • Create listener in a separate step • To minimize down time proceed with manual restores • Check the number of VLFs on AG Databases • Set the same memory on AG Nodes in case of disaster • Don’t forget to move SQL Logins • Don’t forget to move Jobs and Alerts Tips from the battle field