SlideShare a Scribd company logo
AlwaysOn Availability
             Groups
      Way Too Deep
                         Joey D’Antoni
           SQL Saturday #164 Cleveland
                        18 August 2012
About Me

   Principal Architect SQL Server, Comcast Cable
   @jdanton
   Joedantoni.wordpress.com (Slides will be here and on SQL Sat site)
   jdanton1@yahoo.com
Agenda


   Overview of AlwaysOn
   Extended Events Briefly
   What Happens When?
       Turn on AlwaysOn
       We Build an Availability Group
       We add data to a Primary DB
       We backup the transaction log on the secondary
       We query the secondary DB
Warning


   You are going to see a few things that aren’t fully
    documented
   We aren’t touching anything—just looking to see what’s
    going on
   I’m telling you what I think is happening, I’m still trying to
    get answers on some of it
Availability Groups
Extended Events


   Eventual Replacement for SQL Profiler Tracing
   612 Events in SQL 2012
   A significant portion of these deal with AlwaysOn (HADR)
What Happens When…


   We enable AlwaysOn
Enable AlwaysOn

   Demo
HADR_WSFC_CHANGE_NOTIFIER_STATUS
Creating an Availability Group


   Object in AD and DNS Gets Created (Listener)
   Database(s) get restored onto secondary
   Lots of Metadata gets created to Manage the Availability
    Group
Building Availability Groups


   Demo
Moving Data

   Database Mirroring used a single thread per database to move data
   Always On is different—it uses a request pool that is shared between all
    AlwaysOn Databases
   On the primary messages the active log scanner is the log pole.
   When a secondary is ready to receive log blocks a message is sent to the
    primary to start the log scanning.
   This message is handled by a worker in the HadrThreadPool.
Moving Data
Moving Data

   Demo
Transaction Log Backup on Secondary

   One of the new features of 2012
   Allows us to flush the log on the primary database by backing up on the
    secondary
Secondary Log Backup

   Demo
Querying Secondary Instance

   Another Big Feature of AlwaysOn Replicas
   Runs in Snapshot Isolation Transaction Level to Minimize Blocking Issues
   Creates Secondary Stats where missing—in TempDB
Stats on Secondary
Stats on Secondaries

   Demo
Summary

   AlwaysOn is pretty cool
   It’s clear a lot of work went into this
   It’s fairly complicated, but the good news is that it’s easy to work on
Questions
Contact

   @jdanton
   jdanton1@yahoo.com
   Joedantoni.wordpress.com

More Related Content

Similar to Always on availability groups way too deep

Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groups
Edwin M Sarmiento
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 FarmsSPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
Michael Noel
 
Faster Cheaper Better-Replacing Oracle with Hadoop & Solr
Faster Cheaper Better-Replacing Oracle with Hadoop & SolrFaster Cheaper Better-Replacing Oracle with Hadoop & Solr
Faster Cheaper Better-Replacing Oracle with Hadoop & Solr
DataWorks Summit
 
Welcome to Production
Welcome to ProductionWelcome to Production
Welcome to Production
Graeme Foster
 

Similar to Always on availability groups way too deep (20)

Sql server 2012 ha dr
Sql server 2012 ha drSql server 2012 ha dr
Sql server 2012 ha dr
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedIn
 
Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groups
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
A lab tutorial about How you can get started and automate DB12c Multitenant l...
A lab tutorial about How you can get started and automate DB12c Multitenant l...A lab tutorial about How you can get started and automate DB12c Multitenant l...
A lab tutorial about How you can get started and automate DB12c Multitenant l...
 
Sql server 2012 ha dr nova
Sql server 2012 ha dr novaSql server 2012 ha dr nova
Sql server 2012 ha dr nova
 
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 FarmsSPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
SPSToronto - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 Farms
 
Faster, Cheaper, Better - Replacing Oracle with Hadoop & Solr
Faster, Cheaper, Better - Replacing Oracle with Hadoop & SolrFaster, Cheaper, Better - Replacing Oracle with Hadoop & Solr
Faster, Cheaper, Better - Replacing Oracle with Hadoop & Solr
 
Faster Cheaper Better-Replacing Oracle with Hadoop & Solr
Faster Cheaper Better-Replacing Oracle with Hadoop & SolrFaster Cheaper Better-Replacing Oracle with Hadoop & Solr
Faster Cheaper Better-Replacing Oracle with Hadoop & Solr
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2
 
Welcome to Production
Welcome to ProductionWelcome to Production
Welcome to Production
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)
Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)
Mike Krieger - A Brief, Rapid History of Scaling Instagram (with a tiny team)
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021
 
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBADatabase Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
Database Migration using Oracle SQL Developer: DBA Stuff for the Non-DBA
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr UnternehmenDie 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
 
Building React Applications with Redux
Building React Applications with ReduxBuilding React Applications with Redux
Building React Applications with Redux
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'
 

More from Joseph D'Antoni

The modern analytics architecture
The modern analytics architectureThe modern analytics architecture
The modern analytics architecture
Joseph D'Antoni
 
Building perfect sql servers, every time -oops
Building perfect sql servers, every time -oopsBuilding perfect sql servers, every time -oops
Building perfect sql servers, every time -oops
Joseph D'Antoni
 
Accelerating Database Performance Using Compression
Accelerating Database Performance Using CompressionAccelerating Database Performance Using Compression
Accelerating Database Performance Using Compression
Joseph D'Antoni
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
Joseph D'Antoni
 
Sql saturday powerpoint dc_san
Sql saturday powerpoint dc_sanSql saturday powerpoint dc_san
Sql saturday powerpoint dc_san
Joseph D'Antoni
 

More from Joseph D'Antoni (20)

DBA Fundamentals VC
DBA Fundamentals VCDBA Fundamentals VC
DBA Fundamentals VC
 
The modern analytics architecture
The modern analytics architectureThe modern analytics architecture
The modern analytics architecture
 
Building perfect sql servers, every time -oops
Building perfect sql servers, every time -oopsBuilding perfect sql servers, every time -oops
Building perfect sql servers, every time -oops
 
Pass 2013 dantoni azure a gs
Pass 2013 dantoni azure a gsPass 2013 dantoni azure a gs
Pass 2013 dantoni azure a gs
 
Accelerating Database Performance Using Compression
Accelerating Database Performance Using CompressionAccelerating Database Performance Using Compression
Accelerating Database Performance Using Compression
 
Pass bac jd_sm
Pass bac jd_smPass bac jd_sm
Pass bac jd_sm
 
Sql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday bostonSql server 2012 ha and dr sql saturday boston
Sql server 2012 ha and dr sql saturday boston
 
Accelerating Database Performance with Compression
Accelerating Database Performance with CompressionAccelerating Database Performance with Compression
Accelerating Database Performance with Compression
 
Sql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday RichmondSql Server 2012 HA and DR -- SQL Saturday Richmond
Sql Server 2012 HA and DR -- SQL Saturday Richmond
 
Sql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampaSql server 2012 ha and dr sql saturday tampa
Sql server 2012 ha and dr sql saturday tampa
 
Windows server 2012 failover clustering new features
Windows server 2012 failover clustering new featuresWindows server 2012 failover clustering new features
Windows server 2012 failover clustering new features
 
Sql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dcSql server 2012 ha and dr sql saturday dc
Sql server 2012 ha and dr sql saturday dc
 
San presentation nov 2012 central pa
San presentation nov 2012 central paSan presentation nov 2012 central pa
San presentation nov 2012 central pa
 
South jersey sql virtualization
South jersey sql virtualizationSouth jersey sql virtualization
South jersey sql virtualization
 
Virtualization for DBA
Virtualization for DBAVirtualization for DBA
Virtualization for DBA
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Sql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_finalSql server 2012 ha dr 24_hop_final
Sql server 2012 ha dr 24_hop_final
 
Sql saturday powerpoint dc_san
Sql saturday powerpoint dc_sanSql saturday powerpoint dc_san
Sql saturday powerpoint dc_san
 
Sql saturday dc vm ware
Sql saturday dc vm wareSql saturday dc vm ware
Sql saturday dc vm ware
 
Deploying your Application to SQLRally
Deploying your Application to SQLRallyDeploying your Application to SQLRally
Deploying your Application to SQLRally
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Intelligent Gimbal FINAL PAPER Engineering.pdf
Intelligent Gimbal FINAL PAPER Engineering.pdfIntelligent Gimbal FINAL PAPER Engineering.pdf
Intelligent Gimbal FINAL PAPER Engineering.pdf
 

Always on availability groups way too deep

  • 1. AlwaysOn Availability Groups Way Too Deep Joey D’Antoni SQL Saturday #164 Cleveland 18 August 2012
  • 2. About Me  Principal Architect SQL Server, Comcast Cable  @jdanton  Joedantoni.wordpress.com (Slides will be here and on SQL Sat site)  jdanton1@yahoo.com
  • 3. Agenda  Overview of AlwaysOn  Extended Events Briefly  What Happens When?  Turn on AlwaysOn  We Build an Availability Group  We add data to a Primary DB  We backup the transaction log on the secondary  We query the secondary DB
  • 4. Warning  You are going to see a few things that aren’t fully documented  We aren’t touching anything—just looking to see what’s going on  I’m telling you what I think is happening, I’m still trying to get answers on some of it
  • 6. Extended Events  Eventual Replacement for SQL Profiler Tracing  612 Events in SQL 2012  A significant portion of these deal with AlwaysOn (HADR)
  • 7. What Happens When…  We enable AlwaysOn
  • 10. Creating an Availability Group  Object in AD and DNS Gets Created (Listener)  Database(s) get restored onto secondary  Lots of Metadata gets created to Manage the Availability Group
  • 12. Moving Data  Database Mirroring used a single thread per database to move data  Always On is different—it uses a request pool that is shared between all AlwaysOn Databases  On the primary messages the active log scanner is the log pole.  When a secondary is ready to receive log blocks a message is sent to the primary to start the log scanning.  This message is handled by a worker in the HadrThreadPool.
  • 15. Transaction Log Backup on Secondary  One of the new features of 2012  Allows us to flush the log on the primary database by backing up on the secondary
  • 17. Querying Secondary Instance  Another Big Feature of AlwaysOn Replicas  Runs in Snapshot Isolation Transaction Level to Minimize Blocking Issues  Creates Secondary Stats where missing—in TempDB
  • 20. Summary  AlwaysOn is pretty cool  It’s clear a lot of work went into this  It’s fairly complicated, but the good news is that it’s easy to work on
  • 22. Contact  @jdanton  jdanton1@yahoo.com  Joedantoni.wordpress.com