SlideShare a Scribd company logo
ALWAYSON AVAILABILITY GROUP
MAINTENANCE OPERATIONS
Things you need to consider.
Tuning blog: http://www.sqlperformance.com/
E-mail ebooks@sqlsentry.com for free copies of our $10 e-books:
YOUR PRESENTER
• John Q Martin
o Sales Engineer for SQL Sentry
o Worked with SQL Server for ~10 years
o Consultant, SQL DBA, Dev & BI Developer
o Former Microsoft Premier Field Engineer
• Contact Information
o Email: Jmartin@SQLSentry.com
o Twitter: @SQLServerMonkey
o LinkedIn: https://uk.linkedin.com/in/johnqmartin
o Arrange a Demo: http://www.meetme.so/JohnQMartin
AGENDA
• Introductions
• Maintenance Operations:
o Synchronizing Logins
o Statistics Maintenance
o Database Consistency Checks
o Database Index Maintenance
o Synchronizing SQL Agent Jobs
• Summary
• Wrap Up
WHAT & WHY?
• SQL Server Maintenance Operations
• Impact of using AlwaysOn Availability Groups on common
maintenance tasks.
• New maintenance tasks that you need to implement.
SYNCHRONIZE LOGINS
• Logins need to be synchronized between servers for Database
Replicas
• Windows Logins
o SID and other details from Active Directory
o Simple create login statement
• SQL Logins
o Need SID and Password Hash from server where database originated.
SYNCHRONIZE LOGINS
• Important to define synch process between replicas
o Downstream from primary or from where the change was made?
o How to handle conflicts?
• Options
o Manually
o SSIS package
o PoSh
o T-SQL
o Custom process
DEMO
Synchronizing SQL Server Logins between Availability Group Replicas.
TEMPORARY STATS
• When using Active Secondaries, statistics are created in TempDB
on the secondary replicas.
o Database is exact replica so cannot have stats created in it
o Workload is typically different to that of the primary
• Temporary Statistics will be lost on a SQL Server service restart.
TEMPORARY STATS
• New Maintenance job that we have not encountered before
o Identify and collect details of temporary statistics on active secondary
o Process for applying to primary replica
• Automated processing
o ! Caution ! Do not apply all temp stats to primary
o Gather to a location and review, approve for deployment
DEMO
Gathering and assessing Temporary Statistics.
DATABASE CONSISTENCY CHECKS
• Important to understand that DBCC CHECKDB() needs to be run
on all replicas.
o Each system has a unique storage platform that could have corruption
• Consistency Checks are part of corruption detection
o Use CHECKSUM page verification on databases
o Monitor for 823, 824, 825 errors
o DBCC CHECKDB()
• Important to make sure you monitor & manage
dbo.suspect_pages in MSDB
DATABASE CONSISTENCY CHECKS
• Automatic Page Repair can only do so much
o Will not repair File Header (Page 0)
o Will not repair Boot Page (Page 9)
o Will not repair GMA/SGMA/PFS pages
• Have a process for handling the detection of corruption.
o Script/Automate failover to a Secondary Replica in the event of a failed DBCC CHECKDB()
o Manual intervention
• Important to remember you cannot prevent corruption, but you
can plan for it.
DATABASE CONSISTENCY CHECKS
• Secondary needs to be active (readable) for the CHECKDB to
complete without errors.
o An alternative is to create a snapshot on the Secondary Replica and execute CHECKDB
against that.
• Be wary of the impact this will have on the primary if the IO
subsystem is shared.
o Heavy IO Load on the data volumes can result in disk latency if using shared controllers
or HBAs for storage access.
RE-INDEXING OPERATIONS
• AlwaysOn Availability Group Databases are in Full Recovery
Model – Fully Logged
o Generation of transaction log can be high
o Online Index Operations can have a very high impact
• Important to use an intelligent re-indexing mechanism
o Target only those that need to be re-indexed not all
o Use thresholds for reorganization and rebuild
• When is this operation taking place?
o Can impact RPO & RTO in the event of failover scenarios due to the amount of log
generated
o Do you have exclusive access to the database
RE-INDEXING OPERATIONS
• Can you make use of Asynchronous log transfer?
o Log throughput can artificially throttle the re-indexing process with synchronous transfer.
o This will remove the ability to leverage auto-failover while the operation is completing and
as the replica becomes synchronized.
Set all replicas
to
Asynchronous
Begin Re-
indexing
process
Return replicas
to prior state
(Sync/Async)
Verify replicas
are
synchronized
RE-INDEXING OPERATIONS
• What about suspending log transfer?
o Suspend data movement between replicas.
o Bypasses the performance restrictions on transaction log throughput.
Suspend Data
Movement on
Primary
Begin Re-
indexing
process
Resume Data
Movement on
Primary
Verify log is sent
and replicas
have caught up.
DEMO
Re-indexing operations with AlwaysOn Availability Groups
SYNCHRONIZE JOBS
• Important to understand job execution
o Execution on primary or secondary
o Logic in the job or master process to enable/disable
• Which jobs need to be synchronized
o Make use of custom categories to help identify jobs
• Important to define synch process between replicas
o Downstream from primary or from where the change was made?
o How to handle conflicts?
SYNCHRONIZE JOBS
• Conflict detection is important
o Job Configuration Options
o Job Step configuration
o Job Step body
• Methods of conflict detection
o Hash comparison
o String comparison
o Value comparisons
SYNCHRONIZE JOBS
• Jobs can have a lot of dependencies
o Proxies, Credentials, Operators
o Schedules, Categories, Output Locations
• Options
o Manually
o SSIS package
o PoSh
o T-SQL
o Custom process
o MSX Server
SUMMARY
• Think about the logic behind the synchronization of logins & jobs.
• How do you detect, review and handle conflicts between
synchronized objects?
• Consistency Checks (CHECKDB) needs to be done on all
replicas.
• Re-indexing is a balance between performance & impact to the
system.
• Materializing temporary statistics can improve system
QUESTIONS
THANK YOU!
• Slides will be available at http://blogs.sqlsentry.com
• More information at:
o SQLSkills, et al
• E-mail ebooks@sqlsentry.com for free copies of our e-books:
o Just tell them where you met me
• My contact info for other questions:
o Email: Jmartin@SQLSentry.com
o Twitter: @SQLServerMonkey

More Related Content

What's hot

Soap UI - Lesson3
Soap UI - Lesson3Soap UI - Lesson3
Soap UI - Lesson3
Qualitest
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
Joshua Long
 
Wicket Live on Stage
Wicket Live on StageWicket Live on Stage
Wicket Live on Stage
Martijn Dashorst
 
12 Steps to Workload Tuning
12 Steps to Workload Tuning12 Steps to Workload Tuning
12 Steps to Workload Tuning
John Sterrett
 
Ultimate Free SQL Server Toolkit
Ultimate Free SQL Server ToolkitUltimate Free SQL Server Toolkit
Ultimate Free SQL Server Toolkit
Kevin Kline
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
Gunnar Hillert
 
Taskflow
TaskflowTaskflow
Taskflow
Joshua Harlow
 
Data stage Online Training
Data stage Online TrainingData stage Online Training
Data stage Online Training
Glory IT Technologies Pvt. Ltd.
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshare
Morten Andersen-Gott
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
MySQLConference
 
SFDC Batch Apex
SFDC Batch ApexSFDC Batch Apex
SFDC Batch Apex
Sujit Kumar
 
Test eng-meetup-taki take
Test eng-meetup-taki takeTest eng-meetup-taki take
Test eng-meetup-taki take
Takeshi Takizawa
 
Nova states summit
Nova states summitNova states summit
Nova states summit
Joshua Harlow
 
Testing web services
Testing web servicesTesting web services
Testing web services
Taras Lytvyn
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringar
Squeed
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
Dinesh Kaushik
 
Oracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New FeaturesOracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New Features
Randolf Geist
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
Hsuan Fu Lien
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
Ignasi González
 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
Mike Willbanks
 

What's hot (20)

Soap UI - Lesson3
Soap UI - Lesson3Soap UI - Lesson3
Soap UI - Lesson3
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Wicket Live on Stage
Wicket Live on StageWicket Live on Stage
Wicket Live on Stage
 
12 Steps to Workload Tuning
12 Steps to Workload Tuning12 Steps to Workload Tuning
12 Steps to Workload Tuning
 
Ultimate Free SQL Server Toolkit
Ultimate Free SQL Server ToolkitUltimate Free SQL Server Toolkit
Ultimate Free SQL Server Toolkit
 
Spring Batch Performance Tuning
Spring Batch Performance TuningSpring Batch Performance Tuning
Spring Batch Performance Tuning
 
Taskflow
TaskflowTaskflow
Taskflow
 
Data stage Online Training
Data stage Online TrainingData stage Online Training
Data stage Online Training
 
Parallel batch processing with spring batch slideshare
Parallel batch processing with spring batch   slideshareParallel batch processing with spring batch   slideshare
Parallel batch processing with spring batch slideshare
 
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql BottlenecksUsing Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
Using Continuous Etl With Real Time Queries To Eliminate My Sql Bottlenecks
 
SFDC Batch Apex
SFDC Batch ApexSFDC Batch Apex
SFDC Batch Apex
 
Test eng-meetup-taki take
Test eng-meetup-taki takeTest eng-meetup-taki take
Test eng-meetup-taki take
 
Nova states summit
Nova states summitNova states summit
Nova states summit
 
Testing web services
Testing web servicesTesting web services
Testing web services
 
Liquibase få kontroll på dina databasförändringar
Liquibase   få kontroll på dina databasförändringarLiquibase   få kontroll på dina databasförändringar
Liquibase få kontroll på dina databasförändringar
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
Oracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New FeaturesOracle 12c Parallel Execution New Features
Oracle 12c Parallel Execution New Features
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
 

Viewers also liked

What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016
SPC Adriatics
 
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionSQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
Mark Broadbent
 
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to UpgradeAUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
Joel Oleson
 
Sql server 2016 always on 可用性グループ new features
Sql server 2016 always on 可用性グループ new featuresSql server 2016 always on 可用性グループ new features
Sql server 2016 always on 可用性グループ new features
Masayuki Ozawa
 
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
 
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
Lars Platzdasch
 
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
serge luca
 
Automating Compliance Defense in the Cloud - September 2016 Webinar Series
Automating Compliance Defense in the Cloud - September 2016 Webinar SeriesAutomating Compliance Defense in the Cloud - September 2016 Webinar Series
Automating Compliance Defense in the Cloud - September 2016 Webinar Series
Amazon Web Services
 

Viewers also liked (8)

What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016What's New for the BI workload in SharePoint 2016 and SQL Server 2016
What's New for the BI workload in SharePoint 2016 and SQL Server 2016
 
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionSQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
 
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to UpgradeAUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
AUDWC SharePoint 2016 - Top 10 Compelling Business Reasons to Upgrade
 
Sql server 2016 always on 可用性グループ new features
Sql server 2016 always on 可用性グループ new featuresSql server 2016 always on 可用性グループ new features
Sql server 2016 always on 可用性グループ new features
 
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 &...
 
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016SQL Server 2016 and SharePoint 2016  - Lars PLatzdasch - SQL Konferenz 2016
SQL Server 2016 and SharePoint 2016 - Lars PLatzdasch - SQL Konferenz 2016
 
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
 
Automating Compliance Defense in the Cloud - September 2016 Webinar Series
Automating Compliance Defense in the Cloud - September 2016 Webinar SeriesAutomating Compliance Defense in the Cloud - September 2016 Webinar Series
Automating Compliance Defense in the Cloud - September 2016 Webinar Series
 

Similar to Always On Availability Group Maintenance Operations

Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
Kevin Kline
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL Server
Kevin Kline
 
EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance Pages
Enkitec
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
Steven Smith
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf
 
Ioug oow12 em12c
Ioug oow12 em12cIoug oow12 em12c
Ioug oow12 em12c
Kellyn Pot'Vin-Gorman
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
Kevin Kline
 
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
J.D. Wade
 
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
Tobias Koprowski
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
DAGEOP LTD
 
Monitoring sql server
Monitoring sql serverMonitoring sql server
Monitoring sql server
John Martin
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
Senturus
 
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
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
BIWUG
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Randy Shoup
 
OOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with ParallelOOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with Parallel
Kellyn Pot'Vin-Gorman
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
seleniumconf
 
Common SQL Server Mistakes and How to Avoid Them with Tim Radney
Common SQL Server Mistakes and How to Avoid Them with Tim RadneyCommon SQL Server Mistakes and How to Avoid Them with Tim Radney
Common SQL Server Mistakes and How to Avoid Them with Tim Radney
Embarcadero Technologies
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
Steve Knutson
 

Similar to Always On Availability Group Maintenance Operations (20)

Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Top 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL ServerTop 10 DBA Mistakes on Microsoft SQL Server
Top 10 DBA Mistakes on Microsoft SQL Server
 
EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance Pages
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
 
Ioug oow12 em12c
Ioug oow12 em12cIoug oow12 em12c
Ioug oow12 em12c
 
End-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL ServerEnd-to-end Troubleshooting Checklist for Microsoft SQL Server
End-to-end Troubleshooting Checklist for Microsoft SQL Server
 
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
What SQL DBAs need to know about SharePoint-Kansas City, Sept 2013
 
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
 
Database Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance AnalysisDatabase Fundamental Concepts- Series 1 - Performance Analysis
Database Fundamental Concepts- Series 1 - Performance Analysis
 
Monitoring sql server
Monitoring sql serverMonitoring sql server
Monitoring sql server
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
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
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
OOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with ParallelOOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with Parallel
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
Common SQL Server Mistakes and How to Avoid Them with Tim Radney
Common SQL Server Mistakes and How to Avoid Them with Tim RadneyCommon SQL Server Mistakes and How to Avoid Them with Tim Radney
Common SQL Server Mistakes and How to Avoid Them with Tim Radney
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 

More from John Martin

Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDB
John Martin
 
Always On, Multi-Site Design Considerations
Always On, Multi-Site Design ConsiderationsAlways On, Multi-Site Design Considerations
Always On, Multi-Site Design Considerations
John Martin
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.
John Martin
 
Securing your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended PracticesSecuring your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended Practices
John Martin
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
John Martin
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
John Martin
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
John Martin
 
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
John Martin
 

More from John Martin (8)

Tips for managing a VLDB
Tips for managing a VLDBTips for managing a VLDB
Tips for managing a VLDB
 
Always On, Multi-Site Design Considerations
Always On, Multi-Site Design ConsiderationsAlways On, Multi-Site Design Considerations
Always On, Multi-Site Design Considerations
 
Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.Building and configuring sql server; Some Recommended Practices.
Building and configuring sql server; Some Recommended Practices.
 
Securing your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended PracticesSecuring your Data, Reporting Recommended Practices
Securing your Data, Reporting Recommended Practices
 
Microsoft Azure, My First IaaS
Microsoft Azure, My First IaaSMicrosoft Azure, My First IaaS
Microsoft Azure, My First IaaS
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
 
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
Upgrading & Migrating SQL Sever - Southampton SQL Server user group 05/02/2014
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 

Always On Availability Group Maintenance Operations

  • 1. ALWAYSON AVAILABILITY GROUP MAINTENANCE OPERATIONS Things you need to consider.
  • 2. Tuning blog: http://www.sqlperformance.com/ E-mail ebooks@sqlsentry.com for free copies of our $10 e-books:
  • 3. YOUR PRESENTER • John Q Martin o Sales Engineer for SQL Sentry o Worked with SQL Server for ~10 years o Consultant, SQL DBA, Dev & BI Developer o Former Microsoft Premier Field Engineer • Contact Information o Email: Jmartin@SQLSentry.com o Twitter: @SQLServerMonkey o LinkedIn: https://uk.linkedin.com/in/johnqmartin o Arrange a Demo: http://www.meetme.so/JohnQMartin
  • 4. AGENDA • Introductions • Maintenance Operations: o Synchronizing Logins o Statistics Maintenance o Database Consistency Checks o Database Index Maintenance o Synchronizing SQL Agent Jobs • Summary • Wrap Up
  • 5. WHAT & WHY? • SQL Server Maintenance Operations • Impact of using AlwaysOn Availability Groups on common maintenance tasks. • New maintenance tasks that you need to implement.
  • 6. SYNCHRONIZE LOGINS • Logins need to be synchronized between servers for Database Replicas • Windows Logins o SID and other details from Active Directory o Simple create login statement • SQL Logins o Need SID and Password Hash from server where database originated.
  • 7. SYNCHRONIZE LOGINS • Important to define synch process between replicas o Downstream from primary or from where the change was made? o How to handle conflicts? • Options o Manually o SSIS package o PoSh o T-SQL o Custom process
  • 8. DEMO Synchronizing SQL Server Logins between Availability Group Replicas.
  • 9. TEMPORARY STATS • When using Active Secondaries, statistics are created in TempDB on the secondary replicas. o Database is exact replica so cannot have stats created in it o Workload is typically different to that of the primary • Temporary Statistics will be lost on a SQL Server service restart.
  • 10. TEMPORARY STATS • New Maintenance job that we have not encountered before o Identify and collect details of temporary statistics on active secondary o Process for applying to primary replica • Automated processing o ! Caution ! Do not apply all temp stats to primary o Gather to a location and review, approve for deployment
  • 11. DEMO Gathering and assessing Temporary Statistics.
  • 12. DATABASE CONSISTENCY CHECKS • Important to understand that DBCC CHECKDB() needs to be run on all replicas. o Each system has a unique storage platform that could have corruption • Consistency Checks are part of corruption detection o Use CHECKSUM page verification on databases o Monitor for 823, 824, 825 errors o DBCC CHECKDB() • Important to make sure you monitor & manage dbo.suspect_pages in MSDB
  • 13. DATABASE CONSISTENCY CHECKS • Automatic Page Repair can only do so much o Will not repair File Header (Page 0) o Will not repair Boot Page (Page 9) o Will not repair GMA/SGMA/PFS pages • Have a process for handling the detection of corruption. o Script/Automate failover to a Secondary Replica in the event of a failed DBCC CHECKDB() o Manual intervention • Important to remember you cannot prevent corruption, but you can plan for it.
  • 14. DATABASE CONSISTENCY CHECKS • Secondary needs to be active (readable) for the CHECKDB to complete without errors. o An alternative is to create a snapshot on the Secondary Replica and execute CHECKDB against that. • Be wary of the impact this will have on the primary if the IO subsystem is shared. o Heavy IO Load on the data volumes can result in disk latency if using shared controllers or HBAs for storage access.
  • 15. RE-INDEXING OPERATIONS • AlwaysOn Availability Group Databases are in Full Recovery Model – Fully Logged o Generation of transaction log can be high o Online Index Operations can have a very high impact • Important to use an intelligent re-indexing mechanism o Target only those that need to be re-indexed not all o Use thresholds for reorganization and rebuild • When is this operation taking place? o Can impact RPO & RTO in the event of failover scenarios due to the amount of log generated o Do you have exclusive access to the database
  • 16. RE-INDEXING OPERATIONS • Can you make use of Asynchronous log transfer? o Log throughput can artificially throttle the re-indexing process with synchronous transfer. o This will remove the ability to leverage auto-failover while the operation is completing and as the replica becomes synchronized. Set all replicas to Asynchronous Begin Re- indexing process Return replicas to prior state (Sync/Async) Verify replicas are synchronized
  • 17. RE-INDEXING OPERATIONS • What about suspending log transfer? o Suspend data movement between replicas. o Bypasses the performance restrictions on transaction log throughput. Suspend Data Movement on Primary Begin Re- indexing process Resume Data Movement on Primary Verify log is sent and replicas have caught up.
  • 18. DEMO Re-indexing operations with AlwaysOn Availability Groups
  • 19. SYNCHRONIZE JOBS • Important to understand job execution o Execution on primary or secondary o Logic in the job or master process to enable/disable • Which jobs need to be synchronized o Make use of custom categories to help identify jobs • Important to define synch process between replicas o Downstream from primary or from where the change was made? o How to handle conflicts?
  • 20. SYNCHRONIZE JOBS • Conflict detection is important o Job Configuration Options o Job Step configuration o Job Step body • Methods of conflict detection o Hash comparison o String comparison o Value comparisons
  • 21. SYNCHRONIZE JOBS • Jobs can have a lot of dependencies o Proxies, Credentials, Operators o Schedules, Categories, Output Locations • Options o Manually o SSIS package o PoSh o T-SQL o Custom process o MSX Server
  • 22. SUMMARY • Think about the logic behind the synchronization of logins & jobs. • How do you detect, review and handle conflicts between synchronized objects? • Consistency Checks (CHECKDB) needs to be done on all replicas. • Re-indexing is a balance between performance & impact to the system. • Materializing temporary statistics can improve system
  • 24. THANK YOU! • Slides will be available at http://blogs.sqlsentry.com • More information at: o SQLSkills, et al • E-mail ebooks@sqlsentry.com for free copies of our e-books: o Just tell them where you met me • My contact info for other questions: o Email: Jmartin@SQLSentry.com o Twitter: @SQLServerMonkey