SlideShare a Scribd company logo
AlwaysOn
      Wydajność i bezpieczeństwo
           naszych danych


Łukasz Grala
Sesja powstała na podstawie sesji z MTS
                    2012




• Łukasz Grala               • Damian Widera
• Ekspert | SQLExpert.pl     • PM | LGBS
Kontakt z prelegentem

• Łukasz Grala
• Architekt - trener | SQLExpert.pl
• lukasz@sqlexpert.pl
• BLOGI: SQLResearch.com
  PowerPivot.info.pl
• @PowerPivotBlog
• Lider Polish SQL Server User Group
  (PLSSUG)
Kontakt z prelegentem

•   Damian Widera
•   Project Manager & Team Leader | LGBS
•   d.widera@lgbs.pl
•   Lider Polish SQL Server User Group
    (PLSSUG)
Plan prezentacji
•   Rozwiązania High Availability w SQL Server
•   Architektura i wymagania AlwaysOn
•   Realizacja High Availability przy użyciu AlwaysOn
•   Realizacja Disaster Recovery przy użyciu AlwaysOn
•   Wykorzystywanie Replik
•   Monitorowanie i zarządzanie AlwaysOn
•   Podsumowanie
•   Bibliografia (materiały)
Wysoka dostępnośd

High Availability w SQL Server
Wysoka dostępność

 • Zagadnienia wysokiej dostępności
        – RTO (Recovery Time Objective) i RPO
          (Recovery point Objective)
        – SLA i „9”
              Procent
Ilość „9”                 Czas niedostępności rocznie   Czas niedostępności miesięcznie
            dostępności
   2           99%              3 dni, 15 godzin              7 godzin, 15 minut
   3          99.9%           8 godzin, 45 minut             43 minuty, 45 sekund
   4          99.99%        52 minuty, 34 sekundy            4 minuty, 23 sekundy
   5         99.999%          5 minut, 15 sekund               26 sekund, 25ms
Rozwiązania High Availability w SQL Server

 •   Windows Failover Cluster
 •   Mirroring
 •   Log Shiping
 •   Replikacja
Rozwiązania High Avability w SQL Server
AlwaysOn

• Architektura i wymagania
  – AlwaysOn HighAvailability Groups
  – AlwaysOn Failover Cluster
Architektura i wymagania

• Windows Failover Cluster
• SQL Server 2012
Demo

Windows Failover Cluster
AlwaysOn

High Availability i Disaster Recovery
AlwaysOn Availability Groups
AlwaysOn Availability Groups
ALWAYSON AVAILABILITY GROUP
               LISTENER
Availability Groups Listener pozwala połączyć się z inną repliką




           ServerA                                  ServerB                        ServerC

                     2                         2                               2
                    DB                        DB                              DB

                     TechAG1

                     TechListener1


          Primary                                  Primary
                                                   Secondary                  Secondary
                                     Aplikacja w trakcie wystąpienia awarii
ACTIVE SECONDARY – READABLE
               SECONDARY

      SQLservr.exe                                           SQLservr.exe

                   Secondary
                    Primary                      Secondary
                                                 Primary


      CRASH
       InstanceA                                                       InstanceB
                                Database Log
                               Synchronization



DB1        DB2                                                   DB1        DB2


 Reports                                                           Reports
READABLE SECONDARY – DATA
                LATENCY
                     Primary                                  Secondary

                  Log Capture
                   Log Capture   Network        Log Receive
        DB1                                                         DB1


                   Log Pool                                                   Redo
  Commit
                                                                             Thread

      Log Cache                                  Log Cache                 Redo Pages

Log Flush                                            Log Hardened

                                  Acknowledge
       DB1 Log      DB1 Data                      DB1 Log                 DB1 Data
                                    Commit
ALWAYSON ACTIVE SECONDARIES

           AlwaysOn Active Secondary enables efficient utilization of
       high availability hardware resources to improve overall IT efficiency

IT EFFICIENCY AND COST-EFFECTIVENESS ARE CRITICAL FOR
BUSINESSES
Idle hardware is no longer an option.

ACTIVE SECONDARY USES
Read-only workloads
Offloading Backups
CLIENT CONNECTIVITY

READ / WRITE WORKLOAD
•   Connecting using AG Listener
•   Connection using FAILOVER_PARTNER (if connection              CLIENT
    string of existing applications can’t be changed)

READ ONLY WORKLOAD
•   Connection using VNN and ApplicationIntent=ReadOnly
•   Connection to the secondary instance directly
•   ReadOnly Routing

MULTI SUBNET FAILOVER SCENARIO:
•   New client libraries => MultiSubnetFailover=True    PRIMARY            SECONDARIES
•   Old client libraries configure appropriate client
    connection timeout
Demo

High Availability i Distaster recovery
AlwaysOn Group

Monitorowanie i zarządzanie
Monitorowanie i zarządzanie AlwaysOn

•   Dashboard AlwaysOn Avilability Groups
•   DMV
•   PowerShell
•   eXtended Events
Monitorowanie i zarządzanie AlwaysOn
Demo

Monitorowanie
AlwaysOn Failover Cluster
ALWAYSON MULTI-SITE FAILOVER
             CLUSTER INSTANCE
Provide High Availability at the Instance Level
 • Unit of failover = SQL server instance
 • Maintain same virtual network name after failover. Clients re-connect to same name
 • Instance restart requires database to go through recovery

Provide Disaster Recovery at the Instance Level
 • Provide Disaster Recovery protection from site failure: be it network, power,
   infrastructure or other site disasters.
 • Require storage based replication technology and networking considerations
 • Multi-subnet support:




SQL Server 2008 R2          NO          • Create stretch Virtual-LAN (VLAN) to act as a single subnet
                                        • IP address OR dependency support within SQL Server setup
 SQL Server 2012            YES
                                        • SQL Engine skips binding to IP’s not online on start-up
MULTI-SUBNET CLUSTERING


                                  Corpnet
                           Network Name: SqlClust




             IP1: 10.168.0.10
                                      OR            IP2: 192.168.0.10

                        subnet                                subnet
                             1                                     2




Local Site                       SAN Replication         Remote Site
TEMPDB ON LOCAL DISK

WHY WE ENABLE THIS?
• tempdb access occupies large % of     LOCAL TEMP DB       LOCAL TEMP DB
  SAN I/O                                (Fast disk, SSD)    (Fast disk, SSD)

• Fast local HDD/SSD becomes
  standard Server configuration

BENEFITS
• Better overall performance
• Cost saving                              PRIMARY           SECONDARIES

IMPORTANT NOTE!
• Ensure that tempdb local paths are
  available to SQL Service on all the
  nodes
ALWAYSON FAILOVER CLUSTER INSTANCE
          Failover Condition Policy




                      Diagnosti
                      cs

                  Configurable options eliminate false failover
                  Improved logging for better diagnostics
AlwaysOn

Podsumowanie
Podsumowanie
 High Availability and Disaster Recovery SQL Server Solutions    RPO        RTO       Aut.Fail.   Read. secon.
AlwaysOn Availability Group – synchronous commit                  0       Seconds        Yes           0-2

AlwaysOn Availability Group – asynchronous commit               Seconds   Minutes        No            0-4

AlwaysOn Failoiver Cluster Instance                                -      Second to      Yes            -
                                                                           minutes
Database Mirroring – High Safety (synchronous + witness)          0       Seconds        Yes            -

Database Mirroring – High Performance (asynchronous)            Seconds   Minutes        No             -

Log Shipping                                                    Minutes   Minutes        No        Not during a
                                                                          to hours                   restore
Backup, Copy, Restore (- ONLY DISASTER RECOVERY)                 hours    Hours to       No        Not during a
                                                                           days                      restore
Bibliografia (źródła)
•   White paper - Microsoft SQL Server AlwaysOn Solutions Guide for High
    Availability and Disaster Recovery
     – http://msdn.microsoft.com/library/hh781257.aspx
•   White paper - AlwaysOn Solution Guide: Offloading Read-Only Workloads to
    Secondary Replicas
     – http://msdn.microsoft.com/en-us/library/jj542414.aspx
•   White paper - AlwaysOn Architecture Guide: Building a High Availability and
    Disaster Recovery Solution by Using AlwaysOn Availability Groups
     – http://msdn.microsoft.com/en-us/library/jj191711.aspx
•   White paper - AlwaysOn Architecture Guide: Building a High Availability and
    Disaster Recovery Solution by Using Failover Cluster Instances and Availability
    Groups
     – http://msdn.microsoft.com/en-us/library/jj215886.aspx
•   Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability
    Groups (SQL Server)
     – http://msdn.microsoft.com/library/ff878487(v=sql.110).aspx

More Related Content

What's hot

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
Joseph D'Antoni
 
VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3
Vepsun Technologies
 
VMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing Databases
VMworld
 
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
Joseph D'Antoni
 
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use CasesVMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld
 
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
Joseph D'Antoni
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld
 
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
Michael Noel
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
► Supreme Mandal ◄
 
Master VMware Performance and Capacity Management
Master VMware Performance and Capacity ManagementMaster VMware Performance and Capacity Management
Master VMware Performance and Capacity Management
Iwan Rahabok
 
TechNet Live spor 1 sesjon 6 - more vdi
TechNet Live spor 1   sesjon 6 - more vdiTechNet Live spor 1   sesjon 6 - more vdi
TechNet Live spor 1 sesjon 6 - more vdi
Anders Borchsenius
 
Scott Schnoll - Exchange server 2013 high availability and site resilience
Scott Schnoll - Exchange server 2013 high availability and site resilienceScott Schnoll - Exchange server 2013 high availability and site resilience
Scott Schnoll - Exchange server 2013 high availability and site resilience
Nordic Infrastructure Conference
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
heraflux
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
Tobias Koprowski
 
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
Michael Noel
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
Виталий Стародубцев
 
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQLBlue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
Blue Medora
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
Mark Broadbent
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Jignesh Shah
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
Tobias Koprowski
 

What's hot (20)

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
 
VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3VMware Advance Troubleshooting Workshop - Day 3
VMware Advance Troubleshooting Workshop - Day 3
 
VMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing DatabasesVMworld 2014: Virtualizing Databases
VMworld 2014: Virtualizing Databases
 
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
 
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use CasesVMworld Europe 2014: Virtual SAN Best Practices and Use Cases
VMworld Europe 2014: Virtual SAN Best Practices and Use Cases
 
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
 
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
VMworld Europe 2014: Advanced SQL Server on vSphere Techniques and Best Pract...
 
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 - AUSPC2012
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
 
Master VMware Performance and Capacity Management
Master VMware Performance and Capacity ManagementMaster VMware Performance and Capacity Management
Master VMware Performance and Capacity Management
 
TechNet Live spor 1 sesjon 6 - more vdi
TechNet Live spor 1   sesjon 6 - more vdiTechNet Live spor 1   sesjon 6 - more vdi
TechNet Live spor 1 sesjon 6 - more vdi
 
Scott Schnoll - Exchange server 2013 high availability and site resilience
Scott Schnoll - Exchange server 2013 high availability and site resilienceScott Schnoll - Exchange server 2013 high availability and site resilience
Scott Schnoll - Exchange server 2013 high availability and site resilience
 
Right-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual MachineRight-Sizing your SQL Server Virtual Machine
Right-Sizing your SQL Server Virtual Machine
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
Ultimate SharePoint Infrastructure Best Practices Session - Live360 Orlando 2012
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
 
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQLBlue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
Blue Medora Oracle Enterprise Manager (EM12c) Plug-in for PostgreSQL
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBeganKoprowskiT_SPBizConference_2AMaDisasterJustBegan
KoprowskiT_SPBizConference_2AMaDisasterJustBegan
 

Similar to Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL Server 2012

Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffy
Anuradha
 
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
Michael Noel
 
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
Michael Noel
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
Less14 br concepts
Less14 br conceptsLess14 br concepts
Less14 br concepts
Amit Bhalla
 
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
Joseph D'Antoni
 
Drop the Pressure on your Production Server
Drop the Pressure on your Production ServerDrop the Pressure on your Production Server
Drop the Pressure on your Production Server
Microsoft TechNet - Belgium and Luxembourg
 
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
LarryZaman
 
High Availability Solutions in SQL 2012
High Availability Solutions in SQL 2012High Availability Solutions in SQL 2012
High Availability Solutions in SQL 2012
Microsoft TechNet - Belgium and Luxembourg
 
Sp2010 high availlability_sql
Sp2010 high availlability_sqlSp2010 high availlability_sql
Sp2010 high availlability_sql
Samuel Zürcher
 
2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision
Ermando
 
Using Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” serviceUsing Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” service
DoKC
 
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
Michael Noel
 
Exchange 2010 ha ctd
Exchange 2010 ha ctdExchange 2010 ha ctd
Exchange 2010 ha ctd
Kaliyan S
 
Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk
Eran Gampel
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
Xoom Trainings
 
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
James Chen
 
CloudStack technical overview
CloudStack technical overviewCloudStack technical overview
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Michael Noel
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
DATAVERSITY
 

Similar to Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL Server 2012 (20)

Sql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffySql server 2012 - always on deep dive - bob duffy
Sql server 2012 - always on deep dive - bob duffy
 
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
SQL 2012 AlwaysOn Availability Groups (AOAGs) for SharePoint Farms - Norcall ...
 
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
SQL 2012 AlwaysOn Availability Groups for SharePoint 2013 - SharePoint Connec...
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
Less14 br concepts
Less14 br conceptsLess14 br concepts
Less14 br concepts
 
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
 
Drop the Pressure on your Production Server
Drop the Pressure on your Production ServerDrop the Pressure on your Production Server
Drop the Pressure on your Production Server
 
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
 
High Availability Solutions in SQL 2012
High Availability Solutions in SQL 2012High Availability Solutions in SQL 2012
High Availability Solutions in SQL 2012
 
Sp2010 high availlability_sql
Sp2010 high availlability_sqlSp2010 high availlability_sql
Sp2010 high availlability_sql
 
2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision2.Oracle’S High Availability Vision
2.Oracle’S High Availability Vision
 
Using Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” serviceUsing Kubernetes to deliver a “serverless” service
Using Kubernetes to deliver a “serverless” service
 
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
SPSMEL 2012 - SQL 2012 AlwaysOn Availability Groups for SharePoint 2010 / 2013
 
Exchange 2010 ha ctd
Exchange 2010 ha ctdExchange 2010 ha ctd
Exchange 2010 ha ctd
 
Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk Dragonflow Austin Summit Talk
Dragonflow Austin Summit Talk
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
 
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
 
CloudStack technical overview
CloudStack technical overviewCloudStack technical overview
CloudStack technical overview
 
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
Building the Perfect SharePoint 2010 Farm - MS Days Bulgaria 2012
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
 

More from SQLExpert.pl

ETL versus EIM
ETL versus EIMETL versus EIM
ETL versus EIM
SQLExpert.pl
 
Techniki eksploracji danych
Techniki eksploracji danychTechniki eksploracji danych
Techniki eksploracji danych
SQLExpert.pl
 
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
SQLExpert.pl
 
SQL Server 2008 Tips & tricks administracji
SQL Server 2008 Tips & tricks administracjiSQL Server 2008 Tips & tricks administracji
SQL Server 2008 Tips & tricks administracji
SQLExpert.pl
 
Poziomy izolowania transkacji
Poziomy izolowania transkacjiPoziomy izolowania transkacji
Poziomy izolowania transkacji
SQLExpert.pl
 
SQL Server Myths
SQL Server MythsSQL Server Myths
SQL Server Myths
SQLExpert.pl
 

More from SQLExpert.pl (6)

ETL versus EIM
ETL versus EIMETL versus EIM
ETL versus EIM
 
Techniki eksploracji danych
Techniki eksploracji danychTechniki eksploracji danych
Techniki eksploracji danych
 
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
Reprezentacja i obsługa danych hierarchicznych w SQL Server 2008/2008R2
 
SQL Server 2008 Tips & tricks administracji
SQL Server 2008 Tips & tricks administracjiSQL Server 2008 Tips & tricks administracji
SQL Server 2008 Tips & tricks administracji
 
Poziomy izolowania transkacji
Poziomy izolowania transkacjiPoziomy izolowania transkacji
Poziomy izolowania transkacji
 
SQL Server Myths
SQL Server MythsSQL Server Myths
SQL Server Myths
 

Always On - Wydajność i bezpieczeństwo naszych danych - High Availability SQL Server 2012

  • 1. AlwaysOn Wydajność i bezpieczeństwo naszych danych Łukasz Grala
  • 2. Sesja powstała na podstawie sesji z MTS 2012 • Łukasz Grala • Damian Widera • Ekspert | SQLExpert.pl • PM | LGBS
  • 3. Kontakt z prelegentem • Łukasz Grala • Architekt - trener | SQLExpert.pl • lukasz@sqlexpert.pl • BLOGI: SQLResearch.com PowerPivot.info.pl • @PowerPivotBlog • Lider Polish SQL Server User Group (PLSSUG)
  • 4. Kontakt z prelegentem • Damian Widera • Project Manager & Team Leader | LGBS • d.widera@lgbs.pl • Lider Polish SQL Server User Group (PLSSUG)
  • 5. Plan prezentacji • Rozwiązania High Availability w SQL Server • Architektura i wymagania AlwaysOn • Realizacja High Availability przy użyciu AlwaysOn • Realizacja Disaster Recovery przy użyciu AlwaysOn • Wykorzystywanie Replik • Monitorowanie i zarządzanie AlwaysOn • Podsumowanie • Bibliografia (materiały)
  • 7. Wysoka dostępność • Zagadnienia wysokiej dostępności – RTO (Recovery Time Objective) i RPO (Recovery point Objective) – SLA i „9” Procent Ilość „9” Czas niedostępności rocznie Czas niedostępności miesięcznie dostępności 2 99% 3 dni, 15 godzin 7 godzin, 15 minut 3 99.9% 8 godzin, 45 minut 43 minuty, 45 sekund 4 99.99% 52 minuty, 34 sekundy 4 minuty, 23 sekundy 5 99.999% 5 minut, 15 sekund 26 sekund, 25ms
  • 8. Rozwiązania High Availability w SQL Server • Windows Failover Cluster • Mirroring • Log Shiping • Replikacja
  • 10. AlwaysOn • Architektura i wymagania – AlwaysOn HighAvailability Groups – AlwaysOn Failover Cluster
  • 11. Architektura i wymagania • Windows Failover Cluster • SQL Server 2012
  • 13. AlwaysOn High Availability i Disaster Recovery
  • 16. ALWAYSON AVAILABILITY GROUP LISTENER Availability Groups Listener pozwala połączyć się z inną repliką ServerA ServerB ServerC 2 2 2 DB DB DB TechAG1 TechListener1 Primary Primary Secondary Secondary Aplikacja w trakcie wystąpienia awarii
  • 17. ACTIVE SECONDARY – READABLE SECONDARY SQLservr.exe SQLservr.exe Secondary Primary Secondary Primary CRASH InstanceA InstanceB Database Log Synchronization DB1 DB2 DB1 DB2 Reports Reports
  • 18. READABLE SECONDARY – DATA LATENCY Primary Secondary Log Capture Log Capture Network Log Receive DB1 DB1 Log Pool Redo Commit Thread Log Cache Log Cache Redo Pages Log Flush Log Hardened Acknowledge DB1 Log DB1 Data DB1 Log DB1 Data Commit
  • 19. ALWAYSON ACTIVE SECONDARIES AlwaysOn Active Secondary enables efficient utilization of high availability hardware resources to improve overall IT efficiency IT EFFICIENCY AND COST-EFFECTIVENESS ARE CRITICAL FOR BUSINESSES Idle hardware is no longer an option. ACTIVE SECONDARY USES Read-only workloads Offloading Backups
  • 20. CLIENT CONNECTIVITY READ / WRITE WORKLOAD • Connecting using AG Listener • Connection using FAILOVER_PARTNER (if connection CLIENT string of existing applications can’t be changed) READ ONLY WORKLOAD • Connection using VNN and ApplicationIntent=ReadOnly • Connection to the secondary instance directly • ReadOnly Routing MULTI SUBNET FAILOVER SCENARIO: • New client libraries => MultiSubnetFailover=True PRIMARY SECONDARIES • Old client libraries configure appropriate client connection timeout
  • 21. Demo High Availability i Distaster recovery
  • 23. Monitorowanie i zarządzanie AlwaysOn • Dashboard AlwaysOn Avilability Groups • DMV • PowerShell • eXtended Events
  • 27. ALWAYSON MULTI-SITE FAILOVER CLUSTER INSTANCE Provide High Availability at the Instance Level • Unit of failover = SQL server instance • Maintain same virtual network name after failover. Clients re-connect to same name • Instance restart requires database to go through recovery Provide Disaster Recovery at the Instance Level • Provide Disaster Recovery protection from site failure: be it network, power, infrastructure or other site disasters. • Require storage based replication technology and networking considerations • Multi-subnet support: SQL Server 2008 R2 NO • Create stretch Virtual-LAN (VLAN) to act as a single subnet • IP address OR dependency support within SQL Server setup SQL Server 2012 YES • SQL Engine skips binding to IP’s not online on start-up
  • 28. MULTI-SUBNET CLUSTERING Corpnet Network Name: SqlClust IP1: 10.168.0.10 OR IP2: 192.168.0.10 subnet subnet 1 2 Local Site SAN Replication Remote Site
  • 29. TEMPDB ON LOCAL DISK WHY WE ENABLE THIS? • tempdb access occupies large % of LOCAL TEMP DB LOCAL TEMP DB SAN I/O (Fast disk, SSD) (Fast disk, SSD) • Fast local HDD/SSD becomes standard Server configuration BENEFITS • Better overall performance • Cost saving PRIMARY SECONDARIES IMPORTANT NOTE! • Ensure that tempdb local paths are available to SQL Service on all the nodes
  • 30. ALWAYSON FAILOVER CLUSTER INSTANCE Failover Condition Policy Diagnosti cs Configurable options eliminate false failover Improved logging for better diagnostics
  • 32. Podsumowanie High Availability and Disaster Recovery SQL Server Solutions RPO RTO Aut.Fail. Read. secon. AlwaysOn Availability Group – synchronous commit 0 Seconds Yes 0-2 AlwaysOn Availability Group – asynchronous commit Seconds Minutes No 0-4 AlwaysOn Failoiver Cluster Instance - Second to Yes - minutes Database Mirroring – High Safety (synchronous + witness) 0 Seconds Yes - Database Mirroring – High Performance (asynchronous) Seconds Minutes No - Log Shipping Minutes Minutes No Not during a to hours restore Backup, Copy, Restore (- ONLY DISASTER RECOVERY) hours Hours to No Not during a days restore
  • 33. Bibliografia (źródła) • White paper - Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery – http://msdn.microsoft.com/library/hh781257.aspx • White paper - AlwaysOn Solution Guide: Offloading Read-Only Workloads to Secondary Replicas – http://msdn.microsoft.com/en-us/library/jj542414.aspx • White paper - AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using AlwaysOn Availability Groups – http://msdn.microsoft.com/en-us/library/jj191711.aspx • White paper - AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using Failover Cluster Instances and Availability Groups – http://msdn.microsoft.com/en-us/library/jj215886.aspx • Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups (SQL Server) – http://msdn.microsoft.com/library/ff878487(v=sql.110).aspx

Editor's Notes

  1. SLAJD DOMYŚLNIE UKRYTYMożna w nim podać namiary kontaktowe na prelegenta (nie jest to obowiązkowe).Mają one pozwolić (po pobraniu prezentacji) skontaktować się z prelegentem.Można również pokazać ten slajd na prezentacji.
  2. SLAJD DOMYŚLNIE UKRYTYMożna w nim podać namiary kontaktowe na prelegenta (nie jest to obowiązkowe).Mają one pozwolić (po pobraniu prezentacji) skontaktować się z prelegentem.Można również pokazać ten slajd na prezentacji.
  3. Tu wpisujemy AGENDĘ
  4. http://msdn.microsoft.com/en-us/library/hh213417(v=sql.110).aspx#Aglisteners
  5. http://msdn.microsoft.com/en-us/library/ff878253(v=sql.110).aspxExplains purpose and “close to real-time” nature of queries
  6. Explain that the log cache is flushed when either it is full or a transaction has committed.Sync implies no data lossExplain why it is only close to real time and never real time even when the mode is synchronousWhat happensOn Async Replica when network is slow (data loss)What happens if the REDO thread is slow to apply the log
  7. Read/Write WorkloadIf you already have FAILOVER_PARTNER in the connection string, and can’t change the connection string, it will continue to work, provided:There are only two replicas – primary and one secondary, andThe replicas have been set to NOT “Allow All Connections” in secondary roleIf using new client libraries, use MultiSubnetFailover=True in the connection stringRead Only WorkloadIf using legacy client libraries:Set the “Connection Mode in Secondary Role” for the AG replicas to “Allow All Connections”Connect directly to the secondary instanceIf using new client libraries:Set the “Connection Mode in Secondary Role” for the AG replicas to “Allow ReadOnly Connections”Define Routing List for the AG (to take advantage of ReadOnly Rerouting)Use the AG VNN (Listener) to connect to the Availability Group, ANDSpecify ApplicationIntent=ReadOnly in the connection stringIf using new client libraries, use MultiSubnetFailover=True in the connection string
  8. http://msdn.microsoft.com/en-us/library/hh270278(v=sql.110).aspxhttp://msdn.microsoft.com/en-us/library/ms189134(v=sql.110).aspx
  9. http://msdn.microsoft.com/en-us/library/ff878716(v=sql.110).aspx