SlideShare une entreprise Scribd logo
1  sur  19
AlwaysON
Internalsand Enhancements
Sumit Sarabhai
SQL Server Escalation Services
Microsoft
C:/>whoami
8+ years in MS
SQL vNext
Complex
Problems
PG
Engagement
Speaker in
UG Meets,
SQL Talks
&
SSGAS
conference
Expert in SQL
Engine
Currently
learning
HDInsight,
SQL Azure,
NoSQL and
BI
Agenda
 LeaseTimeout
 How it works?
 Split Brain Resolved!
 Enhancements
 Enhanced Availability Configuration
 Load Balanced Active Secondaries
 New Features
 DistributedTransaction Support
 Database Health events cause failover
LeaseTimeout
Concept
 The LeaseTimeout controls the lease mechanism inAlwaysON
 The lease is a simple handshake between the SQL resource DLL
and the SQL Server instance
 Expiration of lease means a system wide event taking place.
 The SQL Server resource DLL is responsible for the lease
heartbeat activity.
 A dedicated lease thread wakes up every 1/4 of the LeaseTimeout
and renew the lease
 Only present on the primary replica
 makes sure the SQL Server and Windows cluster state for AG remain
synchronized.
LeaseTimeout
Howit works?
The activity is a two-way handshake using a pair of named events
Resource DLL LeaseThread Server LeaseWorker/Thread
SetEvent(Client Event)
WaitForSingleObject(Client Event)
WaitForSingleObject(Server Event) SetEvent(Server Event)
Wait for 1/4 the LeaseTimeout Repeat Loop Until Shutdown or Lease Expires
LeaseTimeout
SplitBrainResolved!
Error: 19407, Severity: 16, State: 1.
The lease between availability group ‘MyAG’ and the Windows Server Failover Cluster has
expired. A connectivity issue occurred between the instance of SQL Server and the Windows
Server Failover Cluster. To determine whether the availability group is failing over
correctly, check the corresponding availability group resource in the Windows Server Failover
Cluster
AlwaysOn: The local replica of availability group ‘MyAG’ is going offline because
either the lease expired or lease renewal failed. This is an informational message
If the LeaseTimeout is
exceeded without the
signal exchange the
lease is declared
‘expired’
The cluster manager
undertakes the
configured corrective
actions. The AG is
offline at this point.
Resource DLL reports
that the availability
group no longer ‘looks
alive’ to theWindows
cluster manager
SQL Server prevents further
data modifications (avoiding
split-brain issues) on the
current primary.The DB is
offline at this point.
The cluster manager activity
helps select the proper
primary location and attempts
to online the availability
group.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
SQL Server 2014 &
prior, this will result in
system offline.
Enhanced
Availability
 SQL Server 2016 Increases the number of Automatic Failover
Partners
 Now possible to have two failover partners in addition to the
primary.
 True HighAvailability now possible.
In SQL Server 2016 the
system will be online as
the listener fails over.
Load Balanced
Read-only
Replica
 Read-only routing refers to the ability of SQL Server to route
qualifying read-only connection requests to an availableAlwaysOn
readable secondary replica.
 Read-only clients must direct their connection requests to this
listener, and the client's connection strings must specify the
application intent as "read-only"
 SQL Server 2014 routing lists were the order of the secondaries that
you wanted to access in a failure precedent order.
alter availability group [sqlLabAg01]
modify replica on 'sqlLabDb01'
with
(
primary_role(read_only_routing_list =
)
;
go
('sqlLabDb02','sqlLabDb03','sqlLabDb01'))
Load Balanced
Read-only
Replica
 SQL Server 2016 allows for groups of replicas to be specified to
accessed in a round robin order.
 Configure load-balancing across a set of read-only replicas
 Note the additional parentheses in the routing list.
alter availability group [sqlLabAg01]
modify replica on 'sqlLabDb01'
with
(
primary_role(read_only_routing_list =
)
;
go
(('sqlLabDb02','sqlLabDb03‘),'sqlLabDb01')
Load Balanced
Read-only
Replica
 Allows for scaling out read-only workloads natively
 No need to code bespoke access to secondary replicas
 Workload will adjust in the event of a failover
 Need to be aware of redo latency
 Important to monitor the redo queue as the load balanced replicas
could be at different points in redo process.
 Try to avoid mixing Synchronous andAsynchronous replicas in the
same load balance group for data consistency.
Distributed
Transactions
 AlwaysOnAvailabilityGroups in SQL Server 2012 & 2014 DO NOT
SUPPORT DistributedTransactions.
 Cross Database, intra-instance queries
 Cross Database, inter-instance queries
 Biggest blocker for the adoption ofAvailability Group technology.
 It functions but is not supported.
 SQL Server 2016 fixes this problem.
Distributed
Transactions
 Requires Windows Server 2016 Windows Server 2012 (+KB3090973)
in order to support the use of DistributedTransactions.
 In the event of a failover the recovering database will contact the old
‘primary’ server for DTC.
 This will allow the system to complete crash recovery.
 Availability groups must be created with the CREATEAVAILABILITY
GROUP command and the WITH DTC_SUPPORT = PER_DB clause.
 You cannot currently alter an existing availability group.
Database
Health
Monitoring
 SQL Server 2016 will complete an AvailabilityGroup Failover if
database health is degraded.
 SQL Server 2012 & 2014 required an instance level event in order for a
failover to take place.
 AvailabilityGroup is still the unit of failover in the event of an issue.
 Detection of issues in one database will cause all databases in the
Availability Group to Failover.
 This change requires the setting the DB_FAILOVER option to ON in
the CREATE AVAILABILITYGROUP or ALTER AVAILABILITYGROUP
statements.
Thanks!
Questions Please?

Contenu connexe

Tendances

Windows clustering and quorum basics
Windows clustering and quorum basicsWindows clustering and quorum basics
Windows clustering and quorum basicsHarsh Chawla
 
Sql server 2012 AlwaysOn
Sql server 2012 AlwaysOnSql server 2012 AlwaysOn
Sql server 2012 AlwaysOnWarwick Rudd
 
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...turgaysahtiyan
 
Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffyAnuradha
 
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 &...Antonios Chatzipavlis
 
Implementing sql server always on
Implementing sql server always onImplementing sql server always on
Implementing sql server always onSarabpreet Anand
 
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...SpanishPASSVC
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaSJohn Martin
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012Fadi Abdulwahab
 
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 groupsEdwin M Sarmiento
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceEdwin M Sarmiento
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...Michael Noel
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability► Supreme Mandal ◄
 
SQL Server Cluster Presentation
SQL Server Cluster PresentationSQL Server Cluster Presentation
SQL Server Cluster Presentationwebhostingguy
 
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 2014Antonios Chatzipavlis
 
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 correctlyAntonios Chatzipavlis
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for DummiesMark Broadbent
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Antonios Chatzipavlis
 

Tendances (20)

Windows clustering and quorum basics
Windows clustering and quorum basicsWindows clustering and quorum basics
Windows clustering and quorum basics
 
Sql server 2012 AlwaysOn
Sql server 2012 AlwaysOnSql server 2012 AlwaysOn
Sql server 2012 AlwaysOn
 
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
 
Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffy
 
SQL Server Clustering Part1
SQL Server Clustering Part1SQL Server Clustering Part1
SQL Server Clustering Part1
 
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 &...
 
Implementing sql server always on
Implementing sql server always onImplementing sql server always on
Implementing sql server always on
 
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...
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012
 
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
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 Performance
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
 
SQL Server Cluster Presentation
SQL Server Cluster PresentationSQL Server Cluster Presentation
SQL Server Cluster Presentation
 
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
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
Troubleshooting sql server
Troubleshooting sql serverTroubleshooting sql server
Troubleshooting sql server
 

Similaire à Alwayson AG enhancements

Always on availability group
Always on availability groupAlways on availability group
Always on availability groupwaseem zeeshan
 
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 Mirroringwebhostingguy
 
SQL Anywhere Tips and Tricks
SQL Anywhere Tips and TricksSQL Anywhere Tips and Tricks
SQL Anywhere Tips and TricksSAP Technology
 
Hp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationHp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationCB UTBlog
 
arch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptarch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptssuser418eef
 
Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2Mahesh Dahal
 
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...turgaysahtiyan
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql ServerRishikesh Tiwari
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiAlex Tumanoff
 
Day Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure PlatformDay Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure PlatformWade Wegner
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_confMike McKeown
 
Microsoft SQL High Availability and Scaling
Microsoft SQL High Availability and ScalingMicrosoft SQL High Availability and Scaling
Microsoft SQL High Availability and ScalingJustin Whyte
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr novaJoseph D'Antoni
 
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmare
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmareKoprowskiT_SQLSat152_WelcomeToTheLicensingNightmare
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmareTobias Koprowski
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostechViktoria Bakos
 

Similaire à Alwayson AG enhancements (20)

Always on availability group
Always on availability groupAlways on availability group
Always on availability group
 
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 server 2012 ha dr
Sql server 2012 ha drSql server 2012 ha dr
Sql server 2012 ha dr
 
21 Pdfsam
21 Pdfsam21 Pdfsam
21 Pdfsam
 
21 Rac
21 Rac21 Rac
21 Rac
 
SQL Anywhere Tips and Tricks
SQL Anywhere Tips and TricksSQL Anywhere Tips and Tricks
SQL Anywhere Tips and Tricks
 
Hp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server ConsolidationHp Polyserve Database Utility For Sql Server Consolidation
Hp Polyserve Database Utility For Sql Server Consolidation
 
arch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.pptarch_mtg_sqlsig_hcotter_replication.ppt
arch_mtg_sqlsig_hcotter_replication.ppt
 
Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2Mirroring in SQL Server 2012 R2
Mirroring in SQL Server 2012 R2
 
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...
Microsoft MEA Services Webcast - HA & DR with SQL Server AlwaysOn Availabilit...
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
 
101 Pdfsam
101 Pdfsam101 Pdfsam
101 Pdfsam
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen Nedaskivskyi
 
Day Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure PlatformDay Of Cloud - Windows Azure Platform
Day Of Cloud - Windows Azure Platform
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_conf
 
Microsoft SQL High Availability and Scaling
Microsoft SQL High Availability and ScalingMicrosoft SQL High Availability and Scaling
Microsoft SQL High Availability and Scaling
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr nova
 
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmare
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmareKoprowskiT_SQLSat152_WelcomeToTheLicensingNightmare
KoprowskiT_SQLSat152_WelcomeToTheLicensingNightmare
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostech
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 

Plus de Harsh Chawla

Query tuning optimization
Query tuning optimizationQuery tuning optimization
Query tuning optimizationHarsh Chawla
 
Storage spaces - for SQL Server Workloads
Storage spaces - for SQL Server WorkloadsStorage spaces - for SQL Server Workloads
Storage spaces - for SQL Server WorkloadsHarsh Chawla
 
Pssdiag and sql nexus
Pssdiag and sql nexusPssdiag and sql nexus
Pssdiag and sql nexusHarsh Chawla
 
Manage sql server proactively
Manage sql server proactivelyManage sql server proactively
Manage sql server proactivelyHarsh Chawla
 
SQL Azure DB - BCDR
SQL Azure DB - BCDRSQL Azure DB - BCDR
SQL Azure DB - BCDRHarsh Chawla
 

Plus de Harsh Chawla (6)

AlwaysON FCI
AlwaysON FCIAlwaysON FCI
AlwaysON FCI
 
Query tuning optimization
Query tuning optimizationQuery tuning optimization
Query tuning optimization
 
Storage spaces - for SQL Server Workloads
Storage spaces - for SQL Server WorkloadsStorage spaces - for SQL Server Workloads
Storage spaces - for SQL Server Workloads
 
Pssdiag and sql nexus
Pssdiag and sql nexusPssdiag and sql nexus
Pssdiag and sql nexus
 
Manage sql server proactively
Manage sql server proactivelyManage sql server proactively
Manage sql server proactively
 
SQL Azure DB - BCDR
SQL Azure DB - BCDRSQL Azure DB - BCDR
SQL Azure DB - BCDR
 

Dernier

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 WorkerThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Alwayson AG enhancements

  • 1. AlwaysON Internalsand Enhancements Sumit Sarabhai SQL Server Escalation Services Microsoft
  • 2. C:/>whoami 8+ years in MS SQL vNext Complex Problems PG Engagement Speaker in UG Meets, SQL Talks & SSGAS conference Expert in SQL Engine Currently learning HDInsight, SQL Azure, NoSQL and BI
  • 3. Agenda  LeaseTimeout  How it works?  Split Brain Resolved!  Enhancements  Enhanced Availability Configuration  Load Balanced Active Secondaries  New Features  DistributedTransaction Support  Database Health events cause failover
  • 4. LeaseTimeout Concept  The LeaseTimeout controls the lease mechanism inAlwaysON  The lease is a simple handshake between the SQL resource DLL and the SQL Server instance  Expiration of lease means a system wide event taking place.  The SQL Server resource DLL is responsible for the lease heartbeat activity.  A dedicated lease thread wakes up every 1/4 of the LeaseTimeout and renew the lease  Only present on the primary replica  makes sure the SQL Server and Windows cluster state for AG remain synchronized.
  • 5. LeaseTimeout Howit works? The activity is a two-way handshake using a pair of named events Resource DLL LeaseThread Server LeaseWorker/Thread SetEvent(Client Event) WaitForSingleObject(Client Event) WaitForSingleObject(Server Event) SetEvent(Server Event) Wait for 1/4 the LeaseTimeout Repeat Loop Until Shutdown or Lease Expires
  • 6. LeaseTimeout SplitBrainResolved! Error: 19407, Severity: 16, State: 1. The lease between availability group ‘MyAG’ and the Windows Server Failover Cluster has expired. A connectivity issue occurred between the instance of SQL Server and the Windows Server Failover Cluster. To determine whether the availability group is failing over correctly, check the corresponding availability group resource in the Windows Server Failover Cluster AlwaysOn: The local replica of availability group ‘MyAG’ is going offline because either the lease expired or lease renewal failed. This is an informational message If the LeaseTimeout is exceeded without the signal exchange the lease is declared ‘expired’ The cluster manager undertakes the configured corrective actions. The AG is offline at this point. Resource DLL reports that the availability group no longer ‘looks alive’ to theWindows cluster manager SQL Server prevents further data modifications (avoiding split-brain issues) on the current primary.The DB is offline at this point. The cluster manager activity helps select the proper primary location and attempts to online the availability group.
  • 7. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible.
  • 8. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible.
  • 9. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible.
  • 10. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible.
  • 11. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible. SQL Server 2014 & prior, this will result in system offline.
  • 12. Enhanced Availability  SQL Server 2016 Increases the number of Automatic Failover Partners  Now possible to have two failover partners in addition to the primary.  True HighAvailability now possible. In SQL Server 2016 the system will be online as the listener fails over.
  • 13. Load Balanced Read-only Replica  Read-only routing refers to the ability of SQL Server to route qualifying read-only connection requests to an availableAlwaysOn readable secondary replica.  Read-only clients must direct their connection requests to this listener, and the client's connection strings must specify the application intent as "read-only"  SQL Server 2014 routing lists were the order of the secondaries that you wanted to access in a failure precedent order. alter availability group [sqlLabAg01] modify replica on 'sqlLabDb01' with ( primary_role(read_only_routing_list = ) ; go ('sqlLabDb02','sqlLabDb03','sqlLabDb01'))
  • 14. Load Balanced Read-only Replica  SQL Server 2016 allows for groups of replicas to be specified to accessed in a round robin order.  Configure load-balancing across a set of read-only replicas  Note the additional parentheses in the routing list. alter availability group [sqlLabAg01] modify replica on 'sqlLabDb01' with ( primary_role(read_only_routing_list = ) ; go (('sqlLabDb02','sqlLabDb03‘),'sqlLabDb01')
  • 15. Load Balanced Read-only Replica  Allows for scaling out read-only workloads natively  No need to code bespoke access to secondary replicas  Workload will adjust in the event of a failover  Need to be aware of redo latency  Important to monitor the redo queue as the load balanced replicas could be at different points in redo process.  Try to avoid mixing Synchronous andAsynchronous replicas in the same load balance group for data consistency.
  • 16. Distributed Transactions  AlwaysOnAvailabilityGroups in SQL Server 2012 & 2014 DO NOT SUPPORT DistributedTransactions.  Cross Database, intra-instance queries  Cross Database, inter-instance queries  Biggest blocker for the adoption ofAvailability Group technology.  It functions but is not supported.  SQL Server 2016 fixes this problem.
  • 17. Distributed Transactions  Requires Windows Server 2016 Windows Server 2012 (+KB3090973) in order to support the use of DistributedTransactions.  In the event of a failover the recovering database will contact the old ‘primary’ server for DTC.  This will allow the system to complete crash recovery.  Availability groups must be created with the CREATEAVAILABILITY GROUP command and the WITH DTC_SUPPORT = PER_DB clause.  You cannot currently alter an existing availability group.
  • 18. Database Health Monitoring  SQL Server 2016 will complete an AvailabilityGroup Failover if database health is degraded.  SQL Server 2012 & 2014 required an instance level event in order for a failover to take place.  AvailabilityGroup is still the unit of failover in the event of an issue.  Detection of issues in one database will cause all databases in the Availability Group to Failover.  This change requires the setting the DB_FAILOVER option to ON in the CREATE AVAILABILITYGROUP or ALTER AVAILABILITYGROUP statements.