SlideShare a Scribd company logo
Top 5 Tips to Keep Always On Always
Humming and Users Happy
DECEMBER 13TH, 2017
Speaker Contact Info
How Can You Contact Me?
• Twitter: @sqlatspeed
• LinkedIn: https://www.linkedin.com/in/sqlatspeed/
• Email: mgordon@dminc.com
• Blog: https://www.sqlatspeed.com
1
Speaker Info
About Me
• 15+ years of SQL Server experience
• Managed 24x7 datacenters
• Worked on development teams
• MCSE: Data Management and Analytics
• Home cook and car geek
2
How I Picked My Twitter Handle and Domain Name
Introductory Questions
What Do We Know About Availability Groups?
• Who is responsible for administering an Always On
Availability Group?
• Who thinks they will be responsible for that in the
near future?
• If you are responsible for an AG, is it in production?
• If so, do you have AGs only in production?
4
Agenda
Users and Logins
Quorum Design
Read-only Routing Lists
Backup Strategies
3
1
2
4
5
Maintenance Strategies5
Live Look at On-Call DBA’s Face
Quorum Votes
Your Vote Counts!
• What is cluster quorum?
• How the cluster monitors its health
• Why is it important?
• Cluster will be set offline if quorum is absent
• AG listener is a cluster resource
• AG will be inaccessible if quorum is lost
7
Quorum Votes
Your Vote Counts!
• Who decides on the design?
• Should be collaborative
• DBA should understand design
8
Quorum Votes
Your Vote Counts!
• Quorum Modes
• Node Majority
• Recommended if you have an odd number of
voting nodes
• Node and File Share Majority
• Recommended if you have an even number of
voting nodes and multi-site cluster
• Also recommended for an even number of
voting nodes and no shared storage
9
Quorum Votes
Your Vote Counts!
• Quorum Modes (continued)
• Node and Disk Majority
• Requires shared disk cluster resource
• Recommended for even number of nodes but
no multi-site
• Disk Only
• Please do not do this!
10
Read-Only Routing Lists
Distributing The Workload
• What is a read-only routing list?
• Directs read-only connections to readable
secondaries
• Configured per availability group node
• Not load-balancing mechanism until SQL Server 2016
• What is required to setup a read-only routing list?
• AG must have a listener
• One or more replicas must be readable secondaries
11
Copy User Logins
Accessible and Available Data
• SQL Server security objects
• Users at database level
• Logins at instance level
• Users
• Will be a part of each replica database
• No additional setup required
• Logins
• Will need to be recreated for each instance
• Sp_help_revlogin makes this much easier
12
Keeping Logins
Consistent Across AGs
Demo Time!
Copy User Logins/Jobs
Other Options
• https://dbatools.io
• @psdbatools on Twitter
• Copy-SqlLogin
• Copy-SqlJob
• https://sql2012alwaysonlogin.codeplex.com
• SSIS package to sync only logins to replica
14
Copy User Logins/Jobs
Other Options
• https://www.sqlskills.com/free-tools/ssms-availability-
group-add-in
• Only works with SQL Server 2012/2014 at this time
• Will sync both logins and jobs
15
Regular Transaction Log Backups
Backups To Help The Database Keep Up
• Transaction log backup strategy
• Depends on database workload
• Important to regulate transaction log size
• “Do something, even if it’s wrong”
• Improve recovery time
• Minimize use of storage resources
• Avoid the dreaded shrinking operations
Stagger Index Maintenance
Slow Down To Speed Up
• Regular Index Maintenance
• If you are not doing this, you should be
• Strategy depends on workload
• Reorganize operations may generate more log
traffic than rebuilds
• Especially for large, heavily fragmented indexes
17
Stagger Index Maintenance
Slow Down To Speed Up (continued)
• Effect on replicas
• Large operations can generate lots of log traffic
• Log data must be transported to/restored at replica
18
Stagger Index Maintenance
Do’s and Don’ts
• Staggering do’s and don’ts
• DO ensure that all large indexes are not being
rebuilt at nearly the same time
• DO closely monitor the lag between primary and
replicas when first implementing index maintenance
• DO NOT reorganize every index each day at the
same time lest your network look like the picture on
the next page…
19
Checking AG
Replica Lag
Demo Time!
Checking AG Replica Lag 22
select
SYSDATETIME(),
arcs.replica_server_name,
drcs.database_name,
drs.synchronization_state_desc,
ars.synchronization_health_desc,
CASE WHEN drcs.is_failover_ready=0 THEN 'Possible Data Loss'
WHEN drcs.is_failover_ready=1 THEN 'No Data Loss' END as is_failover_ready,
ISNULL(convert(varchar,drs.log_send_queue_size,113),'Is Current Primary') log_send_queue_size,
ISNULL(convert(varchar,drs.last_sent_time,113),'Is Current Primary') last_sent_time,
ISNULL(convert(varchar,drs.last_received_time,113),'Is Current Primary') last_received_time,
drs.last_commit_lsn,
drs.last_commit_time,
drs.last_hardened_lsn,
ISNULL(convert(varchar,drs.last_hardened_time,113),'Is Current Primary') last_hardened_time,
ISNULL(convert(varchar,drs.last_sent_lsn,113),'Is Current Primary') last_sent_lsn,
ISNULL(convert(varchar,drs.last_received_lsn,113),'Is Current Primary') last_received_lsn,
ISNULL(convert(varchar,drs.redo_rate,113),'Is Current Primary') redo_rate,
ISNULL(convert(varchar,drs.redo_queue_size,113),'Is Current Primary') redo_queue_size,
ars.role_desc
from sys.dm_hadr_availability_replica_states ars
join sys.dm_hadr_database_replica_states drs on ars.replica_id = drs.replica_id
join sys.dm_hadr_database_replica_cluster_states drcs on drs.group_database_id = drcs.group_database_id and
drs.replica_id=drcs.replica_id
join sys.dm_hadr_availability_replica_cluster_states arcs on drcs.replica_id=arcs.replica_id
order by arcs.replica_server_name, drcs.database_name;
Any Questions?
Thank You!
How Can You Stay In Touch?
• Twitter: @sqlatspeed
• LinkedIn: https://www.linkedin.com/in/sqlatspeed/
• Email: mgordon@dminc.com
• Blog: https://www.sqlatspeed.com
24

More Related Content

What's hot

RavenDB 3.5
RavenDB 3.5RavenDB 3.5
RavenDB 3.5
Oren Eini
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Oren Eini
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
Davide Mauri
 
RavenDB 4.0
RavenDB 4.0RavenDB 4.0
RavenDB 4.0
Oren Eini
 
Wait Watchers ; Gain SQL Performance Increases Fast!
Wait Watchers; Gain SQL Performance Increases Fast!Wait Watchers; Gain SQL Performance Increases Fast!
Wait Watchers ; Gain SQL Performance Increases Fast!
Richard Douglas
 
Investigate TempDB Like Sherlock Holmes
Investigate TempDB Like Sherlock HolmesInvestigate TempDB Like Sherlock Holmes
Investigate TempDB Like Sherlock Holmes
Richard Douglas
 
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
Bob Pusateri
 
Lucene 101
Lucene 101Lucene 101
Lucene 101
Varun Thacker
 
Got documents?
Got documents?Got documents?
Got documents?
Maggie Pint
 
Understanding indices
Understanding indicesUnderstanding indices
Understanding indices
Richard Douglas
 
Outgrowing an internet startup: database administration in a fast growing com...
Outgrowing an internet startup: database administration in a fast growing com...Outgrowing an internet startup: database administration in a fast growing com...
Outgrowing an internet startup: database administration in a fast growing com...
spil-engineering
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
Amazee Labs
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
Richard Schneeman
 
Lightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst PracticesLightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst Practices
PGConf APAC
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot Persistence
Abdelmonaim Remani
 
Postgres Open
Postgres OpenPostgres Open
Postgres Open
Ines Sombra
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
Atlassian
 
Road to database automation: database source control
Road to database automation: database source controlRoad to database automation: database source control
Road to database automation: database source control
Eduardo Piairo
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers
Ike Ellis
 
Reduce latency and boost sql server io performance
Reduce latency and boost sql server io performanceReduce latency and boost sql server io performance
Reduce latency and boost sql server io performance
Kevin Kline
 

What's hot (20)

RavenDB 3.5
RavenDB 3.5RavenDB 3.5
RavenDB 3.5
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
 
SSIS Monitoring Deep Dive
SSIS Monitoring Deep DiveSSIS Monitoring Deep Dive
SSIS Monitoring Deep Dive
 
RavenDB 4.0
RavenDB 4.0RavenDB 4.0
RavenDB 4.0
 
Wait Watchers ; Gain SQL Performance Increases Fast!
Wait Watchers; Gain SQL Performance Increases Fast!Wait Watchers; Gain SQL Performance Increases Fast!
Wait Watchers ; Gain SQL Performance Increases Fast!
 
Investigate TempDB Like Sherlock Holmes
Investigate TempDB Like Sherlock HolmesInvestigate TempDB Like Sherlock Holmes
Investigate TempDB Like Sherlock Holmes
 
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
 
Lucene 101
Lucene 101Lucene 101
Lucene 101
 
Got documents?
Got documents?Got documents?
Got documents?
 
Understanding indices
Understanding indicesUnderstanding indices
Understanding indices
 
Outgrowing an internet startup: database administration in a fast growing com...
Outgrowing an internet startup: database administration in a fast growing com...Outgrowing an internet startup: database administration in a fast growing com...
Outgrowing an internet startup: database administration in a fast growing com...
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Lightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst PracticesLightening Talk - PostgreSQL Worst Practices
Lightening Talk - PostgreSQL Worst Practices
 
The Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot PersistenceThe Rise of NoSQL and Polyglot Persistence
The Rise of NoSQL and Polyglot Persistence
 
Postgres Open
Postgres OpenPostgres Open
Postgres Open
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data CenterAtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
 
Road to database automation: database source control
Road to database automation: database source controlRoad to database automation: database source control
Road to database automation: database source control
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers
 
Reduce latency and boost sql server io performance
Reduce latency and boost sql server io performanceReduce latency and boost sql server io performance
Reduce latency and boost sql server io performance
 

Similar to Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy

Best practices with development of enterprise-scale SharePoint solutions - Pa...
Best practices with development of enterprise-scale SharePoint solutions - Pa...Best practices with development of enterprise-scale SharePoint solutions - Pa...
Best practices with development of enterprise-scale SharePoint solutions - Pa...
SPC Adriatics
 
Navigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern DatabasesNavigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern Databases
Shivji Kumar Jha
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Mydbops
 
Breaking data
Breaking dataBreaking data
Breaking data
Terry Bunio
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
J.D. Wade
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
Ryusuke Kajiyama
 
Scaling apps for the big time
Scaling apps for the big timeScaling apps for the big time
Scaling apps for the big time
proitconsult
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
Red Gate Software
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
Jannet Peetz
 
What SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-CinncinatiWhat SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-Cinncinati
J.D. Wade
 
Got documents - The Raven Bouns Edition
Got documents - The Raven Bouns EditionGot documents - The Raven Bouns Edition
Got documents - The Raven Bouns Edition
Maggie Pint
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus
Ashnikbiz
 
SQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and ApproachSQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and Approach
Indra Dharmawan
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health Check
Luis Guirigay
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 
What SQL DBA's need to know about SharePoint
What SQL DBA's need to know about SharePointWhat SQL DBA's need to know about SharePoint
What SQL DBA's need to know about SharePoint
J.D. Wade
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
Quest
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
EDB
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
Kenny Buntinx
 

Similar to Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy (20)

Best practices with development of enterprise-scale SharePoint solutions - Pa...
Best practices with development of enterprise-scale SharePoint solutions - Pa...Best practices with development of enterprise-scale SharePoint solutions - Pa...
Best practices with development of enterprise-scale SharePoint solutions - Pa...
 
Navigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern DatabasesNavigating Transactions: ACID Complexity in Modern Databases
Navigating Transactions: ACID Complexity in Modern Databases
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
 
Breaking data
Breaking dataBreaking data
Breaking data
 
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
SharePoint Saturday St. Louis 2014: What SharePoint Admins need to know about...
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
Scaling apps for the big time
Scaling apps for the big timeScaling apps for the big time
Scaling apps for the big time
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
 
What SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-CinncinatiWhat SharePoint Admins need to know about SQL-Cinncinati
What SharePoint Admins need to know about SQL-Cinncinati
 
Got documents - The Raven Bouns Edition
Got documents - The Raven Bouns EditionGot documents - The Raven Bouns Edition
Got documents - The Raven Bouns Edition
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus
 
SQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and ApproachSQL Server Upgrade and Consolidation - Methodology and Approach
SQL Server Upgrade and Consolidation - Methodology and Approach
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health Check
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
 
What SQL DBA's need to know about SharePoint
What SQL DBA's need to know about SharePointWhat SQL DBA's need to know about SharePoint
What SQL DBA's need to know about SharePoint
 
SQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To KnowSQL Server 2017 Enhancements You Need To Know
SQL Server 2017 Enhancements You Need To Know
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
 

More from IDERA Software

The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...
IDERA Software
 
Problems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloudProblems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloud
IDERA Software
 
Public cloud uses and limitations
Public cloud uses and limitationsPublic cloud uses and limitations
Public cloud uses and limitations
IDERA Software
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
IDERA Software
 
Monitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL ServerMonitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL Server
IDERA Software
 
Database administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databasesDatabase administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databases
IDERA Software
 
Six tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costsSix tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costs
IDERA Software
 
Idera live 2021: The Power of Abstraction by Steve Hoberman
Idera live 2021:  The Power of Abstraction by Steve HobermanIdera live 2021:  The Power of Abstraction by Steve Hoberman
Idera live 2021: The Power of Abstraction by Steve Hoberman
IDERA Software
 
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
Idera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian FlugIdera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian Flug
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
IDERA Software
 
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
IDERA Software
 
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021:  Managing Digital Transformation on a Budget by Bert ScalzoIdera live 2021:  Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
IDERA Software
 
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
IDERA Software
 
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
IDERA Software
 
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
IDERA Software
 
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021:  Performance Tuning Azure SQL Database by Monica RathbunIdera live 2021:  Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
IDERA Software
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
IDERA Software
 
Benefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERABenefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERA
IDERA Software
 
Achieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERAAchieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERA
IDERA Software
 
Benefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERABenefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERA
IDERA Software
 

More from IDERA Software (20)

The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...The role of the database administrator (DBA) in 2020: Changes, challenges, an...
The role of the database administrator (DBA) in 2020: Changes, challenges, an...
 
Problems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloudProblems and solutions for migrating databases to the cloud
Problems and solutions for migrating databases to the cloud
 
Public cloud uses and limitations
Public cloud uses and limitationsPublic cloud uses and limitations
Public cloud uses and limitations
 
Optimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptxOptimize the performance, cost, and value of databases.pptx
Optimize the performance, cost, and value of databases.pptx
 
Monitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL ServerMonitor cloud database with SQL Diagnostic Manager for SQL Server
Monitor cloud database with SQL Diagnostic Manager for SQL Server
 
Database administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databasesDatabase administrators (dbas) face increasing pressure to monitor databases
Database administrators (dbas) face increasing pressure to monitor databases
 
Six tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costsSix tips for cutting sql server licensing costs
Six tips for cutting sql server licensing costs
 
Idera live 2021: The Power of Abstraction by Steve Hoberman
Idera live 2021:  The Power of Abstraction by Steve HobermanIdera live 2021:  The Power of Abstraction by Steve Hoberman
Idera live 2021: The Power of Abstraction by Steve Hoberman
 
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
Idera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian FlugIdera live 2021:  Why Data Lakes are Critical for AI, ML, and IoT  By Brian Flug
Idera live 2021: Why Data Lakes are Critical for AI, ML, and IoT By Brian Flug
 
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
Idera live 2021: Will Data Vault add Value to Your Data Warehouse? 3 Signs th...
 
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021:  Managing Digital Transformation on a Budget by Bert ScalzoIdera live 2021:  Managing Digital Transformation on a Budget by Bert Scalzo
Idera live 2021: Managing Digital Transformation on a Budget by Bert Scalzo
 
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...Idera live 2021:  Keynote Presentation The Future of Data is The Data Cloud b...
Idera live 2021: Keynote Presentation The Future of Data is The Data Cloud b...
 
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...Idera live 2021:   Managing Databases in the Cloud - the First Step, a Succes...
Idera live 2021: Managing Databases in the Cloud - the First Step, a Succes...
 
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...Idera live 2021:  Database Auditing - on-Premises and in the Cloud by Craig M...
Idera live 2021: Database Auditing - on-Premises and in the Cloud by Craig M...
 
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021:  Performance Tuning Azure SQL Database by Monica RathbunIdera live 2021:  Performance Tuning Azure SQL Database by Monica Rathbun
Idera live 2021: Performance Tuning Azure SQL Database by Monica Rathbun
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
 
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
How Users of a Performance Monitoring Tool Can Benefit from an Inventory Mana...
 
Benefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERABenefits of Third Party Tools for MySQL | IDERA
Benefits of Third Party Tools for MySQL | IDERA
 
Achieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERAAchieve More with Less Resources | IDERA
Achieve More with Less Resources | IDERA
 
Benefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERABenefits of SQL Server 2017 and 2019 | IDERA
Benefits of SQL Server 2017 and 2019 | IDERA
 

Recently uploaded

Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 

Recently uploaded (20)

Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 

Geek Sync | Top 5 Tips to Keep Always On Always Humming and Users Happy

  • 1. Top 5 Tips to Keep Always On Always Humming and Users Happy DECEMBER 13TH, 2017
  • 2. Speaker Contact Info How Can You Contact Me? • Twitter: @sqlatspeed • LinkedIn: https://www.linkedin.com/in/sqlatspeed/ • Email: mgordon@dminc.com • Blog: https://www.sqlatspeed.com 1
  • 3. Speaker Info About Me • 15+ years of SQL Server experience • Managed 24x7 datacenters • Worked on development teams • MCSE: Data Management and Analytics • Home cook and car geek 2
  • 4. How I Picked My Twitter Handle and Domain Name
  • 5. Introductory Questions What Do We Know About Availability Groups? • Who is responsible for administering an Always On Availability Group? • Who thinks they will be responsible for that in the near future? • If you are responsible for an AG, is it in production? • If so, do you have AGs only in production? 4
  • 6. Agenda Users and Logins Quorum Design Read-only Routing Lists Backup Strategies 3 1 2 4 5 Maintenance Strategies5
  • 7. Live Look at On-Call DBA’s Face
  • 8. Quorum Votes Your Vote Counts! • What is cluster quorum? • How the cluster monitors its health • Why is it important? • Cluster will be set offline if quorum is absent • AG listener is a cluster resource • AG will be inaccessible if quorum is lost 7
  • 9. Quorum Votes Your Vote Counts! • Who decides on the design? • Should be collaborative • DBA should understand design 8
  • 10. Quorum Votes Your Vote Counts! • Quorum Modes • Node Majority • Recommended if you have an odd number of voting nodes • Node and File Share Majority • Recommended if you have an even number of voting nodes and multi-site cluster • Also recommended for an even number of voting nodes and no shared storage 9
  • 11. Quorum Votes Your Vote Counts! • Quorum Modes (continued) • Node and Disk Majority • Requires shared disk cluster resource • Recommended for even number of nodes but no multi-site • Disk Only • Please do not do this! 10
  • 12. Read-Only Routing Lists Distributing The Workload • What is a read-only routing list? • Directs read-only connections to readable secondaries • Configured per availability group node • Not load-balancing mechanism until SQL Server 2016 • What is required to setup a read-only routing list? • AG must have a listener • One or more replicas must be readable secondaries 11
  • 13. Copy User Logins Accessible and Available Data • SQL Server security objects • Users at database level • Logins at instance level • Users • Will be a part of each replica database • No additional setup required • Logins • Will need to be recreated for each instance • Sp_help_revlogin makes this much easier 12
  • 15. Copy User Logins/Jobs Other Options • https://dbatools.io • @psdbatools on Twitter • Copy-SqlLogin • Copy-SqlJob • https://sql2012alwaysonlogin.codeplex.com • SSIS package to sync only logins to replica 14
  • 16. Copy User Logins/Jobs Other Options • https://www.sqlskills.com/free-tools/ssms-availability- group-add-in • Only works with SQL Server 2012/2014 at this time • Will sync both logins and jobs 15
  • 17. Regular Transaction Log Backups Backups To Help The Database Keep Up • Transaction log backup strategy • Depends on database workload • Important to regulate transaction log size • “Do something, even if it’s wrong” • Improve recovery time • Minimize use of storage resources • Avoid the dreaded shrinking operations
  • 18. Stagger Index Maintenance Slow Down To Speed Up • Regular Index Maintenance • If you are not doing this, you should be • Strategy depends on workload • Reorganize operations may generate more log traffic than rebuilds • Especially for large, heavily fragmented indexes 17
  • 19. Stagger Index Maintenance Slow Down To Speed Up (continued) • Effect on replicas • Large operations can generate lots of log traffic • Log data must be transported to/restored at replica 18
  • 20. Stagger Index Maintenance Do’s and Don’ts • Staggering do’s and don’ts • DO ensure that all large indexes are not being rebuilt at nearly the same time • DO closely monitor the lag between primary and replicas when first implementing index maintenance • DO NOT reorganize every index each day at the same time lest your network look like the picture on the next page… 19
  • 21.
  • 23. Checking AG Replica Lag 22 select SYSDATETIME(), arcs.replica_server_name, drcs.database_name, drs.synchronization_state_desc, ars.synchronization_health_desc, CASE WHEN drcs.is_failover_ready=0 THEN 'Possible Data Loss' WHEN drcs.is_failover_ready=1 THEN 'No Data Loss' END as is_failover_ready, ISNULL(convert(varchar,drs.log_send_queue_size,113),'Is Current Primary') log_send_queue_size, ISNULL(convert(varchar,drs.last_sent_time,113),'Is Current Primary') last_sent_time, ISNULL(convert(varchar,drs.last_received_time,113),'Is Current Primary') last_received_time, drs.last_commit_lsn, drs.last_commit_time, drs.last_hardened_lsn, ISNULL(convert(varchar,drs.last_hardened_time,113),'Is Current Primary') last_hardened_time, ISNULL(convert(varchar,drs.last_sent_lsn,113),'Is Current Primary') last_sent_lsn, ISNULL(convert(varchar,drs.last_received_lsn,113),'Is Current Primary') last_received_lsn, ISNULL(convert(varchar,drs.redo_rate,113),'Is Current Primary') redo_rate, ISNULL(convert(varchar,drs.redo_queue_size,113),'Is Current Primary') redo_queue_size, ars.role_desc from sys.dm_hadr_availability_replica_states ars join sys.dm_hadr_database_replica_states drs on ars.replica_id = drs.replica_id join sys.dm_hadr_database_replica_cluster_states drcs on drs.group_database_id = drcs.group_database_id and drs.replica_id=drcs.replica_id join sys.dm_hadr_availability_replica_cluster_states arcs on drcs.replica_id=arcs.replica_id order by arcs.replica_server_name, drcs.database_name;
  • 25. Thank You! How Can You Stay In Touch? • Twitter: @sqlatspeed • LinkedIn: https://www.linkedin.com/in/sqlatspeed/ • Email: mgordon@dminc.com • Blog: https://www.sqlatspeed.com 24