SlideShare a Scribd company logo
SQL Server
AlwaysOn for
Dummies
Mark Broadbent
Principal SQL Consultant
SQLCloud
SQLCLOUD.CO.UK
About
Mark Broadbent
“Possibly the hardest drinking DBA on the planet”
“30 billion times more intelligent than a live mattress”
Email: mark.broadbent@sqlcambs.org.uk
Twitter: retracement
Blog: http://tenbulls.co.uk
PASS UK Regional Mentor
Event Lead to the UK’s first ever SQLSaturday (Cambridge)
Event #2nd due on Friday 27th Sept 2013 (pre-con) 28th Sept (Community day)
http://www.sqlsaturday.com/228/eventhome.aspx
Cambridgeshire PASS Chapter UG Leader http://sqlcambs.org.uk
SQLSaturday Cambridge 2013
27th (pre-con) and 28th (free) September
http://www.sqlsaturday.com/228
Queen’s College, Cambridge CB3 9ET
What is the air-speed velocity of an unladen swallow?
Agenda
Windows Server
Failover Clustering
& Quorum
AlwaysOn
Availability Groups
AlwaysOn Failover
Clustered Instances
Introduction to
AlwaysOn
3
2
1
4
Introduction to AlwaysOn
AlwaysOn Technologies*1
*1 According to my interpretation!
AlwaysOn
Availability Groups
AlwaysOn Failover
Clustered Instances
Database
Mirroring
Scalable Shared
Database
Replication
“AlwAys On” isnae new!
Dr. Evil
Senior Microsoft
Windows Clustering
Program Manager
Don’t let the terms confuse you!
Cluster Node
Cluster Server
Node
Server
Cluster Group
Role
Service or Application
Virtual Server
Failover Cluster
Clustered Instance
SQL Server
Server
Resources (take your pick)
Quorum
Client Network
Private Network
Interconnect
Internal Network
Public Network...
LAN
SAN
Shared Storage
Disk
Cluster Storage
Active/Passive
Single Instance
Multi Instance
N+n Cluster
Majority
Votes
Availability Group
Replica
Readonly Replica
AlwaysOn Clustered Instances Provide…
• Abstraction of SQL instance
• High availability of Instance name
• Instance and related services failover as a unit
• Instance components such as jobs and logins not
a consideration
• Distributed Transaction Support
BUT
• Shared data with single point of failure per
instance.
• Complex to administrate
Availability Groups Provide…
• Abstraction at the databases level
• Failover as a single Unit
• High availability of “Instance” (listener) name
• All the benefits of DB Mirroring
….and less of the problems (FS is supported)
BUT
• Connected replicas are potentially single point of failure (i.e
user error – deletion of records)
• Complex (arguably less than FCI) to administrate
• Instance level components not failed over –contained dbs
partially come to the rescue
• No Distributed Transaction support for failover
AlwaysOn is…
Windows Server
Failover Clustering
The foundation of AlwaysOn
“The Magic” of Clustering
Clustered
“Application”
Cluster Nodes
The “magic” of clustering is the ability for the cluster to ensure only one set of services,
executables and resources are alive on one node for a clustered application at any one time.
A clustered application will be installed onto each node
“The Magic” of Clustering
Clustered
“Application”
Cluster Nodes
failover
“The Magic” of Clustering
Clustered
“Application”
Cluster Nodes
failover
Storage
Network
Internal
Network
A Basic Windows Cluster
Public
(or Client) Network
Shared
(or Asymmetric) Storage
Quorum
The Cluster
Group
Cluster Node
Cluster Service
Understanding Quorum
I’m
Alive!
Quorum Models
Node majority (no witness)
Node majority with witness (disk or file share)
No majority (disk witness only)
+Node weighting
Dynamic weighting -new to
Windows 2012
DEMO
Taking a look at our Cluster
AlwaysOn Failover
Clustered Instances
Instance Level High Availability
Installation
Create and install your clustered
instance on the first cluster node
For all other nodes install
executables on every other node
Clustered Instances
Node A Node B
SQL Server Instance A
Role (formerly known as
Cluster Group)
Network
Name
Clustered Instances
failoverNode A Node B
SQL Server Instance A
Role (formerly known as
Cluster Group)
Network
Name
AlwaysOn
Availability Groups
Database[s] Level High Availability
Availability Group consists of…
Listener
(Name and
IP)
Availability
Group
Resource
Availability
Group
Databases
SQL Instance Components Wndows Cluster Resources
Replica/s
Availability
Cluster Group
Mirroring
Endpoints
Availability
Group
Listener
(Name and
IP)
Do not flippin’ touch!
Transaction Logs
Secondary Replica
SQL Server Instance A
Transaction Logs
Primary Replica
SQL Server Instance A
Availability Groups
Transaction Logs
Redo
Sync/ Async
Secondary Replica
SQL Server Instance B
Listener
Transaction Logs
Secondary Replica
SQL Server Instance A
Availability Groups
Transaction Logs
Sync/ Async
Secondary Replica
SQL Server Instance B
Listener
Redo
Transaction Logs
Primary Replica
SQL Server Instance B
Availability Groups and Readable Secondaries
• 5 Replicas
• 2 Synchronous, others Asynchronous
• 1 Read-Write
• 4 either Read-only, Read-Intent or No Access
DEMO
Using AlwaysOn
ReadOnly Routing
• Set connection string property
ApplicationIntent=ReadOnly
• Must connect to a listener.
• Modify Secondary Replica Roles with read
only routing url.
• Modify Primary Replica Roles with read only
routing list.
In Summary…
• It is not all Butterflys and Unicorns so choose the
HA solution appropriate to your requirements.
• Failover Clustering is a very mature technology
but requires specialist skill and understanding. It
does not provide scalability.
• Availability Groups partially rely on Windows
Clustering but are slightly easier to setup and
manage. They also provide reporting query
scalability.
Tha mo bhàta-foluaimein loma-làn easgannan
for attending this session and
SQLSaturday #202 in Edinburgh
Thank you!

More Related Content

PPTX
SQL server part 1
PDF
SQL Server High Availability Solutions (Pros & Cons)
PPTX
Always on in SQL Server 2012
PPT
Sql server basics
PDF
MS-SQL SERVER ARCHITECTURE
PPS
Oracle Database Overview
PPTX
Why oracle data guard new features in oracle 18c, 19c
PDF
MAA Best Practices for Oracle Database 19c
SQL server part 1
SQL Server High Availability Solutions (Pros & Cons)
Always on in SQL Server 2012
Sql server basics
MS-SQL SERVER ARCHITECTURE
Oracle Database Overview
Why oracle data guard new features in oracle 18c, 19c
MAA Best Practices for Oracle Database 19c

What's hot (20)

PDF
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
PPTX
Microsoft SQL Server internals & architecture
PPTX
Sql 2012 always on
PPTX
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
PPT
Less05 storage
PPTX
Sql server basics
PDF
Step by Step Restore rman to different host
PPTX
Oracle DBA
PPTX
MySQL_MariaDB로의_전환_기술요소-202212.pptx
PPSX
Ppt dbsec-oow2013-avdf
PDF
Oracle db performance tuning
PDF
MariaDB Galera Cluster - Simple, Transparent, Highly Available
PPTX
High Availability for Oracle SE2
PDF
mysql 8.0 architecture and enhancement
PDF
How to Manage Scale-Out Environments with MariaDB MaxScale
PPTX
SQL Server Integration Services
PDF
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
PDF
Always on in sql server 2017
PDF
Best Practice for Achieving High Availability in MariaDB
PPTX
Oracle Database Security
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Microsoft SQL Server internals & architecture
Sql 2012 always on
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
Less05 storage
Sql server basics
Step by Step Restore rman to different host
Oracle DBA
MySQL_MariaDB로의_전환_기술요소-202212.pptx
Ppt dbsec-oow2013-avdf
Oracle db performance tuning
MariaDB Galera Cluster - Simple, Transparent, Highly Available
High Availability for Oracle SE2
mysql 8.0 architecture and enhancement
How to Manage Scale-Out Environments with MariaDB MaxScale
SQL Server Integration Services
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Always on in sql server 2017
Best Practice for Achieving High Availability in MariaDB
Oracle Database Security
Ad

Similar to SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition (20)

PPT
SQL Server Cluster Presentation
PPTX
Using Kubernetes to deliver a “serverless” service
PDF
SQL Server Clustering for Dummies
PDF
Schizophrenic High Availability with SQL and Windows 2016
PDF
Microservices and Friends
PPT
Clustering van IT-componenten
PPTX
Sql server 2012 ha dr
PDF
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
PPT
Clustered Architecture Patterns Delivering Scalability And Availability
PDF
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
PDF
Moves Like Jagger - Upgrading to SQL Server 2012 (SQLBits XI Edition)
PDF
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
PPTX
Mastering Chaos - A Netflix Guide to Microservices
PDF
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
PDF
QConSF2016-JoshEvans-MasteringChaosANetflixGuidetoMicroservices-compressed.pdf
PPTX
Azure SQL - more or/and less than SQL Server
ODP
Why MySQL
PPTX
GWAB 2015 - Data Plaraform
PDF
Implementing sql server always on
PPT
Dr. Jekyll and Mr. Hyde
SQL Server Cluster Presentation
Using Kubernetes to deliver a “serverless” service
SQL Server Clustering for Dummies
Schizophrenic High Availability with SQL and Windows 2016
Microservices and Friends
Clustering van IT-componenten
Sql server 2012 ha dr
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Clustered Architecture Patterns Delivering Scalability And Availability
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Moves Like Jagger - Upgrading to SQL Server 2012 (SQLBits XI Edition)
20141021 AWS Cloud Taekwon - Startup Best Practices on AWS
Mastering Chaos - A Netflix Guide to Microservices
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
QConSF2016-JoshEvans-MasteringChaosANetflixGuidetoMicroservices-compressed.pdf
Azure SQL - more or/and less than SQL Server
Why MySQL
GWAB 2015 - Data Plaraform
Implementing sql server always on
Dr. Jekyll and Mr. Hyde
Ad

More from Mark Broadbent (14)

PDF
Persistence Is Futile - Implementing Delayed Durability
PDF
Lockless in Seattle - Using In-Memory OLTP for Transaction Processing
PDF
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...
PDF
lock, block & two smoking barrels
PDF
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
PDF
Being Buck Woody - PASS Summit 2014 Edition
PDF
Enter The Dragon - SQL 2014 on Server Core - SQLSaturday #341 Porto Edition
PDF
Ye Olde Cluster Curiosity Shoppe
PDF
SQLSaturday #188 Lisbon - READPAST & Furious: Transactions, Locking and Isola...
PDF
READPAST & Furious - Transactions, Locking and Isolation. PASS Summit 2012 Ed...
PDF
PASS 2012 "Moves Like Jagger" - Upgrading to SQL Server 2012
PDF
READPAST & Furious: Locking
PDF
Orders of-magnitude-scale-out-your-sql-server-data-slideshare
PDF
Thinking outside the box, learning a little about a lot
Persistence Is Futile - Implementing Delayed Durability
Lockless in Seattle - Using In-Memory OLTP for Transaction Processing
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...
lock, block & two smoking barrels
Enter the Dragon - SQL 2014 on Server Core PASS Summit 2014 Edition
Being Buck Woody - PASS Summit 2014 Edition
Enter The Dragon - SQL 2014 on Server Core - SQLSaturday #341 Porto Edition
Ye Olde Cluster Curiosity Shoppe
SQLSaturday #188 Lisbon - READPAST & Furious: Transactions, Locking and Isola...
READPAST & Furious - Transactions, Locking and Isolation. PASS Summit 2012 Ed...
PASS 2012 "Moves Like Jagger" - Upgrading to SQL Server 2012
READPAST & Furious: Locking
Orders of-magnitude-scale-out-your-sql-server-data-slideshare
Thinking outside the box, learning a little about a lot

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction

SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition

  • 1. SQL Server AlwaysOn for Dummies Mark Broadbent Principal SQL Consultant SQLCloud SQLCLOUD.CO.UK
  • 2. About Mark Broadbent “Possibly the hardest drinking DBA on the planet” “30 billion times more intelligent than a live mattress” Email: mark.broadbent@sqlcambs.org.uk Twitter: retracement Blog: http://tenbulls.co.uk PASS UK Regional Mentor Event Lead to the UK’s first ever SQLSaturday (Cambridge) Event #2nd due on Friday 27th Sept 2013 (pre-con) 28th Sept (Community day) http://www.sqlsaturday.com/228/eventhome.aspx Cambridgeshire PASS Chapter UG Leader http://sqlcambs.org.uk
  • 3. SQLSaturday Cambridge 2013 27th (pre-con) and 28th (free) September http://www.sqlsaturday.com/228 Queen’s College, Cambridge CB3 9ET What is the air-speed velocity of an unladen swallow?
  • 4. Agenda Windows Server Failover Clustering & Quorum AlwaysOn Availability Groups AlwaysOn Failover Clustered Instances Introduction to AlwaysOn 3 2 1 4
  • 6. AlwaysOn Technologies*1 *1 According to my interpretation! AlwaysOn Availability Groups AlwaysOn Failover Clustered Instances Database Mirroring Scalable Shared Database Replication
  • 8. Dr. Evil Senior Microsoft Windows Clustering Program Manager
  • 9. Don’t let the terms confuse you! Cluster Node Cluster Server Node Server Cluster Group Role Service or Application Virtual Server Failover Cluster Clustered Instance SQL Server Server Resources (take your pick) Quorum Client Network Private Network Interconnect Internal Network Public Network... LAN SAN Shared Storage Disk Cluster Storage Active/Passive Single Instance Multi Instance N+n Cluster Majority Votes Availability Group Replica Readonly Replica
  • 10. AlwaysOn Clustered Instances Provide… • Abstraction of SQL instance • High availability of Instance name • Instance and related services failover as a unit • Instance components such as jobs and logins not a consideration • Distributed Transaction Support BUT • Shared data with single point of failure per instance. • Complex to administrate
  • 11. Availability Groups Provide… • Abstraction at the databases level • Failover as a single Unit • High availability of “Instance” (listener) name • All the benefits of DB Mirroring ….and less of the problems (FS is supported) BUT • Connected replicas are potentially single point of failure (i.e user error – deletion of records) • Complex (arguably less than FCI) to administrate • Instance level components not failed over –contained dbs partially come to the rescue • No Distributed Transaction support for failover
  • 13. Windows Server Failover Clustering The foundation of AlwaysOn
  • 14. “The Magic” of Clustering Clustered “Application” Cluster Nodes The “magic” of clustering is the ability for the cluster to ensure only one set of services, executables and resources are alive on one node for a clustered application at any one time. A clustered application will be installed onto each node
  • 15. “The Magic” of Clustering Clustered “Application” Cluster Nodes failover
  • 16. “The Magic” of Clustering Clustered “Application” Cluster Nodes failover
  • 17. Storage Network Internal Network A Basic Windows Cluster Public (or Client) Network Shared (or Asymmetric) Storage Quorum The Cluster Group Cluster Node Cluster Service
  • 19. Quorum Models Node majority (no witness) Node majority with witness (disk or file share) No majority (disk witness only) +Node weighting Dynamic weighting -new to Windows 2012
  • 20. DEMO Taking a look at our Cluster
  • 22. Installation Create and install your clustered instance on the first cluster node For all other nodes install executables on every other node
  • 23. Clustered Instances Node A Node B SQL Server Instance A Role (formerly known as Cluster Group) Network Name
  • 24. Clustered Instances failoverNode A Node B SQL Server Instance A Role (formerly known as Cluster Group) Network Name
  • 26. Availability Group consists of… Listener (Name and IP) Availability Group Resource Availability Group Databases SQL Instance Components Wndows Cluster Resources Replica/s Availability Cluster Group Mirroring Endpoints Availability Group Listener (Name and IP) Do not flippin’ touch!
  • 27. Transaction Logs Secondary Replica SQL Server Instance A Transaction Logs Primary Replica SQL Server Instance A Availability Groups Transaction Logs Redo Sync/ Async Secondary Replica SQL Server Instance B Listener
  • 28. Transaction Logs Secondary Replica SQL Server Instance A Availability Groups Transaction Logs Sync/ Async Secondary Replica SQL Server Instance B Listener Redo Transaction Logs Primary Replica SQL Server Instance B
  • 29. Availability Groups and Readable Secondaries • 5 Replicas • 2 Synchronous, others Asynchronous • 1 Read-Write • 4 either Read-only, Read-Intent or No Access
  • 31. ReadOnly Routing • Set connection string property ApplicationIntent=ReadOnly • Must connect to a listener. • Modify Secondary Replica Roles with read only routing url. • Modify Primary Replica Roles with read only routing list.
  • 32. In Summary… • It is not all Butterflys and Unicorns so choose the HA solution appropriate to your requirements. • Failover Clustering is a very mature technology but requires specialist skill and understanding. It does not provide scalability. • Availability Groups partially rely on Windows Clustering but are slightly easier to setup and manage. They also provide reporting query scalability.
  • 33. Tha mo bhàta-foluaimein loma-làn easgannan for attending this session and SQLSaturday #202 in Edinburgh Thank you!