SlideShare a Scribd company logo
1 of 53
Download to read offline
#SQLSAT777
AlwaysOn in SQL Server 2017
Gianluca Hotz
#SQLSAT777
Organizers
GetLatestVersion.it
#SQLSAT777
Sponsors
#SQLSAT777
Who am I?
• Gianluca Hotz | @glhotz | ghotz@ugiss.org
• Independent Consultant, Founder and Mentor SolidQ
• 20+ years on SQL Server (from 4.21 in 1996)
• Database modeling and development, sizing and administration,
upgrade and migration, performance tuning
• Interests
• Relational model, DBMS architecture, Security, High Availability
and Disaster Recovery
• Community
• 20 years Microsoft MVP SQL Server (from 1998)
• Founder and President UGISS
• User Group Italiano SQL Server (PASS Chapter)
#SQLSAT777
Whats is AlwaysOn?
• New name for HA and DR technologies
• Failover Cluster Instance (FCI)
• Availability Groups (AG)
• Previously named HADRON
• Keep in mind when searching articles
• Still present in some DMVs (_hadr_)
#SQLSAT777
AlwaysOn FCI
#SQLSAT777
FCI Review
• Protects an entire SQL Server instance
• All databases including system databases (logins, jobs, etc.)
• Automatic failover (client connects to a VNN/IP Address)
• Requires Shared Storage
• Geographic DR with SQL Server < 2012
• Proprietary solutions for Stretch V-LAN
• Proprietary solutions for storage replication
• Multi-subnet support >=2012
#SQLSAT777
Normal operations with AlwaysOn FCI
Primary Site
Shared Storage
SQLCLUSTER
SQL FCI Primary
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
#SQLSAT777
Node unavailability with AlwaysOn FCI
Primary Site
Shared Storage
SQLCLUSTER
SQL FCI Primary
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
CRASH
#SQLSAT777
Multi-Subnet Support
• Nodes on different subnets
• IP Address resources in OR
• Still need storage replication
• (Enterprise Edition required)
http://msdn.microsoft.com/en-us/library/ff878716.aspx
#SQLSAT777
Multi-Subnet: how do clients reconnect?
• New clients
• Try IP addresses in order
• Avoid DNS update latencies
• New connection string parameter
• MultiSubnetFailover=True
• Try IP addresses in parallel
• Old clients can be problematic…
• Check driver support!
• … OleDB Provider fixed 30 March 2018!!
• https://blogs.msdn.microsoft.com/sqlnativeclient/2017/10/06/ann
ouncing-the-new-release-of-ole-db-driver-for-sql-server
• https://blogs.msdn.microsoft.com/sqlreleaseservices/released-
microsoft-ole-db-driver-for-sql-server
http://msdn.microsoft.com/en-us/library/ff878716.aspx
#SQLSAT777
Multi-Subnet problem with old clients
• Applies to
• Libraries without support for MultiSubnetFailover
• Connection strings that can’t be modified
• Origin
• Multiple IP registration in DNS
• Library timeout < TCP timeout (15 vs 21 sec.)
• Mitigation
• Raise library timeout > 30-40 sec. (if possible)
• Avoid registering all IPs (affects everyone)
• Reduce DNS updates latency (HostRecordTTL)
• Reduce DNS cache expiration on the client
• For AG: implement both on separate Availability Groups
http://msdn.microsoft.com/en-us/library/ff878716.aspx
#SQLSAT777
Normal operation with multi-subnet
Secondary Site
Core Services
Primary Site
Shared Storage
SQLCLUSTER
Multi-subnet SQL FCI
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
Shared Storage
SQL04
SAN02
10.2.0.20
SQL03
10.2.0.10
10.2.1.100
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
Proprietary Storage
Replication
#SQLSAT777
AlwaysOn FCI multi-subnet resilience
Secondary Site
Core Services
Primary Site
Shared Storage
SQLCLUSTER
Multi-subnet SQL FCI
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
Shared Storage
SQL04
SAN02
10.2.0.20
SQL03
10.2.0.10
10.2.1.100
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
Proprietary Storage
Replication
CRASH
CRASH
CRASH
#SQLSAT777
AlwaysOn FCI multi-subnet DR with HA
Secondary Site
Core Services
Primary Site
Shared Storage
SQLCLUSTER
Multi-subnet SQL FCI
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
Shared Storage
SQL04
SAN02
10.2.0.20
SQL03
10.2.0.10
10.2.1.100
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
Proprietary Storage
Replication
CRASH
CRASH
CRASH
CRASH
#SQLSAT777
AlwaysOn FCI in SQL Server 2014
• Support for Windows Server 2012 CSV
• Support for FCI in Sysprep
• Same support as for Availability Groups in
• sys.dm_hadr_cluster
• sys.dm_hadr_cluster_members
• sys.dm_hadr_cluster_networks
• New DMV
• sys.dm_io_cluster_valid_path_names
#SQLSAT777
AlwaysOn FCI in SQL Server 2016
• Group Managed Service Accounts (gMSA)
• Managed directly by AD
• Automatic password rotation
• SQL Server 2014 Supported on Windows Server 2012
R2 + hotfix
#SQLSAT777
AlwaysOn FCI in SQL Server 2017
• Support for Linux
#SQLSAT777
AlwaysOn AG
#SQLSAT777
Data replicas review
• Log Shipping
• Database Mirroring
• Replication
• SQL Server 2012+: Availability Groups
#SQLSAT777
Log Shipping
• Advantages
• Entire database replicas
• Multiple replicas per database
• Simple and robust
• Disadvantages
• Only asynchronous replicas
• Readable replicas with trade-offs
• Updated to last log restore
• Need to disconnect clients before restoring
#SQLSAT777
Database Mirroring
• Advantages
• Entire database replicas
• Synchronous and asynchronous (EE) replicas
• Simple and robust
• Disadvantages
• Only one replica per database
• Readable replicas need Database Snapshot
• Enterprise Edition
• Updated to last snapshot creation time
• Need to disconnect or handle multiple snapshot names
#SQLSAT777
Replication
• Advantages
• More granular (depends on scenario)
• Multiple replicas
• Readable & updateable replicas
• Disadvantages
• More granular (depends on scenario)
• Only asynchronous replicas
• Typically higher latency
• Complexity and maintenance overhead
#SQLSAT777
Common Problems
• Manual Failover*
• No coordination to failover multiple DBs
• No backups on replicas*
• Specific limitations
• E.g. FILESTREAM, cross-database consistency of
transactions, only one replica
#SQLSAT777
AG as evolution of Database Mirroring
• Coordinated failover of multiple DBs
• Multiple replicas (up to 4 initially)*
• Synchronous/asynchronous replicas
• Up-to-date readable replicas
• Ability to off-load maintenance on replicas
• e.g. backups
#SQLSAT777
AG Overview
https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server
#SQLSAT777
Normal operations with AlwaysOn AG
Primary Site
SQLCLUSTER
Availability Group AG01
SQL02
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
SQLAG01
10.1.1.200
DAS DAS
Primary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
#SQLSAT777
Node unavailability with AlwaysOn AG
Primary Site
SQLCLUSTER
Availability Group AG01
SQL02
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
SQLAG01
10.1.1.200
DAS DAS
Primary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
CRASH
#SQLSAT777
AlwaysOn AG multi-subnet resilience
Secondary SitePrimary Site
SQLCLUSTER
Availability Group AG01
Core Services
SQL02
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
SQL04
10.2.0.20
SQL03
10.2.0.10
Quorum Witness
Disk Share Node
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
SQLAG01
10.1.1.200 10.2.1.200
DAS DAS DAS DAS
Primary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
CRASH
#SQLSAT777
AlwaysOn AG multi-subnet DR with HA
Secondary SitePrimary Site
SQLCLUSTER
Availability Group AG01
Core Services
SQL02
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
SQL04
10.2.0.20
SQL03
10.2.0.10
Quorum Witness
Disk Share Node
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
SQLAG01
10.1.1.200 10.2.1.200
DAS DAS DAS DAS
Primary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
CRASH
CRASH
#SQLSAT777
Read-Only Access
• Replicas roles
• Primary: READ_WRITE|ALL
• Secondary: NO|READ_ONLY|ALL
• New connection property
• ApplicationIntent
• Name slightly different across client APIs
• Read-Only Routing
#SQLSAT777
AlwaysOn AG Topology Example
A
A
Direct attached storage local, regional and geo secondaries
A
A
Synchronous
data movement
Asynchronous data
movement
#SQLSAT777
Read-Only Access Capacity Planning
• Synchronization latency of replica can raise
• because of the read I/O activity
• Impact on tempdb
• Temporary statistics
• Automatically created
• Gone after failover
• Read Committed Snapshot Isolation
• 14 bytes added to rows at primary (on updates)
#SQLSAT777
Problem with Replicas at Database level
• Need Manual synchronization for objects outside
database scope
• New logins/users, Jobs, …
• Solution for logins/users
• Contained databases
• Problem with ApplicationIntent=ReadOnly
#SQLSAT777
Availability Groups in SQL Server 2014
• Up to 8 secondary replicas (was 4)
• still only 2 can be in synchronous mode
• Secondary readable replicas remain online
• when disconnected from primary
• When there’s a quorum loss
• New DMV
• sys.fn_hadr_is_primary_replica
• Add Azure Replica Wizard
#SQLSAT777
Availability Groups in SQL Server 2016
• Up to 3 synchronous replicas with automatic failover (was 2)
• Enhanched database failover (fail on write transaction failure)
• Secondary replica seeding (instead of backup/restore)
• Read-only secondary replicas load balancing
• MSDTC supported with Windows Server 2016 (cross-instance only)
• Database encryption support (eg. SSIDB)
• Cross-domain and domain-independent AG
• Distributed AG
• Log record transport re-written to be much faster
#SQLSAT777
Scalability with Read-Only AG in SQL 2016
Async Log Synchronization
OLTP workload
#SQLSAT777
Scalability with Distributed AG in SQL 2016
AG2
Async Log
Synchronization
Distributed availability group
AG1
#SQLSAT777
Basic Availability Groups in SQL Server 2016
• Availabile with Standard Edition
• Solution for deprecated Database Mirorring (almost…)
• Limited to 2 replicas
• Synchronous or asynchronous (DBM required EE for async!)
• Replica can be in Azure
• Limited to 1 database per Availability Group
• Secondary replica not accessible
• eg. read-only, backups…
#SQLSAT777
AG Turbocharged in SQL Server 2016
• Problem
• Performance not adequate in some synchronous replica scenarios
• Higher scalability required with more/faster resources
• Target: 95% performance with 1 synchronous replica
• Many optimizations in SQL Server 2016
• Eg. reduced number of needed worker thread, use more parallelism,
reduced contention
• Results
• 95% with 1 synchronous replica, 90% with 2 replicas
#SQLSAT777
Availability Groups in SQL Server 2017
• Cross-database transaction support (MSDTC)
• Minimum number of (sync) replica to commit
• Clusterless sceanarios support
• CLUSTER_TYPE = NONE
• e.g. read-only scale out replicas not used for HA
• Linux support
• CLUSTER_TYPE = EXTERNAL (Pacemaker)
• CLUSTER_TYPE = NONE
• Cross-OS migration Windows-Linux supported
#SQLSAT777
Advanced Scenarios
AlwaysOn FCI+AG
Secondary SitePrimary Site
SQLCLUSTER
Availability Group AG01
Core Services
Shared Storage
SQL FCI Primary
SQL02
SAN01
SQLFCI01
ADMINWKS
Router
10.1.0.20
SQL01
10.1.0.10
Quorum Witness
Disk Share Node
10.1.1.100
10.1.1.50
Core Services
DC01 DC02
10.1.0.1 10.1.0.2
Shared Storage
SQL FCI Secondary
SQL04
SAN02
SQLFCI02
10.2.0.20
SQL03
10.2.0.10
Quorum Witness
Disk Share Node
10.2.1.100
10.2.1.50
DC03 DC04
10.2.0.1 10.2.0.2
SQLAG01
10.1.1.200 10.2.1.200
SQL Server Database
Replication
Primary
Replica
AGDB01
AGDB02
Secondary
Replica
AGDB01
AGDB02
CRASH
CRASH
CRASH
#SQLSAT777
Hybrid Cloud
Run backups
Run BI reports
#SQLSAT777
Considerations
#SQLSAT777
Other Hybrid Cloud Scenarios
• Database Mirroring
• VPN not needed for domain authentication
• Can use certificate based authentication
• Log Shipping
#SQLSAT777
Choice based on business requirements
Recovery Point
Objective
Recovery Time
Objective
SLA
Requirements
Resiliency
Requirements
Deployment
Span
Read/Write
Scale-out
Cost Of
Deployment
Environmental
Constraints
#SQLSAT777
«Zero downtime»?
• Excellence in designing and planning
• Excellence in execution
• Application resiliency
• Retry logic (exponential back-off)
• Useful in other context (deadlocks, update conflicts)
#SQLSAT777
Change in licensing
• Software Assurance needed for passive servers
• “Beginning with SQL Server 2014, each active server licensed with SA coverage allows the
installation of a single passive server used for fail-over support.”
• Right to run only one free passive secondary
• “The active server license (s) must be covered with SA, and allow for one passive secondary SQL
Server, with up to the same amount of compute as the licensed active server, only.”
• Impacts everything: log shipping, mirroring, AG, FCI
• SQL Server 2014-2017 Licensing Datasheets
• http://download.microsoft.com/download/6/6/F/66FF3259-1466-4BBA-A505-
2E3DA5B2B1FA/SQL_Server_2014_Licensing_Datasheet.pdf
• http://download.microsoft.com/download/F/D/5/FD5E5C28-6973-4273-8737-
D69AA3BEA243/SQL_Server_2016_Licensing_Datasheet_EN_US.pdf
• http://download.microsoft.com/download/7/8/c/78cdf005-97c1-4129-926b-
ce4a6fe92cf5/sql_server_2017_licensing_guide.pdf
• SQL Server 2017 Licensing Guide
• http://download.microsoft.com/download/7/8/c/78cdf005-97c1-4129-926b-
ce4a6fe92cf5/sql_server_2017_licensing_guide.pdf
#SQLSAT777
AG Main Resources
• Official documentation
• https://docs.microsoft.com/en-us/sql/sql-server/failover-
clusters/windows/always-on-failover-cluster-instances-sql-server
• https://docs.microsoft.com/en-us/sql/database-
engine/availability-groups/windows/always-on-availability-
groups-sql-server
• Blogs
• CSS SQL Server Engineers
• http://blogs.msdn.com/b/psssql/archive/tags/alwayson
• SQL AlwaysOn Blog
• http://blogs.msdn.com/b/sqlalwayson (stale)
#SQLSAT777
AG Whitepapers series
• 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
• 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
• AlwaysOn Solution Guide: Offloading Read-Only Workloads to Secondary Replicas
• http://msdn.microsoft.com/en-us/library/jj542414.aspx
• Cross-cluster Migration of AlwaysOn Availability Groups for Operating System Upgrades
• http://msdn.microsoft.com/en-us/library/jj873730.aspx
• Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery
• http://msdn.microsoft.com/en-us/library/hh781257.aspx
• Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping
• http://msdn.microsoft.com/en-us/library/jj635217.aspx
• Multisite Failover Cluster Instance
• http://sqlcat.com/sqlcat/b/whitepapers/archive/2011/12/22/sql-server-2012-alwayson_3a00_-multisite-failover-cluster-instance.aspx
• SQL Server 2012 AlwaysOn High Availability and Disaster Recovery Design Patterns
• http://sqlcat.com/sqlcat/b/msdnmirror/archive/2011/12/22/sql-server-2012-alwayson-high-availability-and-disaster-recovery-design-
patterns.aspx
#SQLSAT777
Resources SQL Server 2019
• Ignite 2018 Video
• Architecting a highly available database platform with
SQL Server
• https://www.youtube.com/watch?v=5h1Xkh9CU-c
#SQLSAT777
Thanks!

More Related Content

What's hot

C34 Always On 可用性グループ 構築時のポイント by 小澤真之
C34 Always On 可用性グループ 構築時のポイント by 小澤真之C34 Always On 可用性グループ 構築時のポイント by 小澤真之
C34 Always On 可用性グループ 構築時のポイント by 小澤真之
Insight Technology, Inc.
 
Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW Locks
Jignesh Shah
 

What's hot (20)

MariaDB MaxScale
MariaDB MaxScaleMariaDB MaxScale
MariaDB MaxScale
 
Running MariaDB in multiple data centers
Running MariaDB in multiple data centersRunning MariaDB in multiple data centers
Running MariaDB in multiple data centers
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
C34 Always On 可用性グループ 構築時のポイント by 小澤真之
C34 Always On 可用性グループ 構築時のポイント by 小澤真之C34 Always On 可用性グループ 構築時のポイント by 小澤真之
C34 Always On 可用性グループ 構築時のポイント by 小澤真之
 
The SQL Server 2022 Workshop.pptx
The SQL Server 2022 Workshop.pptxThe SQL Server 2022 Workshop.pptx
The SQL Server 2022 Workshop.pptx
 
Performance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL DatabasePerformance Tuning And Optimization Microsoft SQL Database
Performance Tuning And Optimization Microsoft SQL Database
 
Giải pháp always on trong sql server 2012
Giải pháp always on trong sql server 2012Giải pháp always on trong sql server 2012
Giải pháp always on trong sql server 2012
 
Backup and recovery in oracle
Backup and recovery in oracleBackup and recovery in oracle
Backup and recovery in oracle
 
Espresso: LinkedIn's Distributed Data Serving Platform (Paper)
Espresso: LinkedIn's Distributed Data Serving Platform (Paper)Espresso: LinkedIn's Distributed Data Serving Platform (Paper)
Espresso: LinkedIn's Distributed Data Serving Platform (Paper)
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
DOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant EnvironmentsDOAG Oracle Unified Audit in Multitenant Environments
DOAG Oracle Unified Audit in Multitenant Environments
 
Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW Locks
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMT
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 

Similar to Always on in sql server 2017

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
 
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorldSQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
Polish SQL Server User Group
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
Mark Broadbent
 

Similar to Always on in sql server 2017 (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...
Business_Continuity_Planning_with_SQL_Server_HADR_options_TechEd_Bangalore_20...
 
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorldSQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
SQLDay2013_Denny Cherry - SQLServer2012inaHighlyAvailableWorld
 
Sum209
Sum209Sum209
Sum209
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4
 
Nordic infrastructure Conference 2017 - SQL Server on Linux Overview
Nordic infrastructure Conference 2017 - SQL Server on Linux OverviewNordic infrastructure Conference 2017 - SQL Server on Linux Overview
Nordic infrastructure Conference 2017 - SQL Server on Linux Overview
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
 
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuAzure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
 
SQL Server Clustering Part1
SQL Server Clustering Part1SQL Server Clustering Part1
SQL Server Clustering Part1
 
CCI2017 - Considerations for Migrating Databases to Azure - Gianluca Sartori
CCI2017 - Considerations for Migrating Databases to Azure - Gianluca SartoriCCI2017 - Considerations for Migrating Databases to Azure - Gianluca Sartori
CCI2017 - Considerations for Migrating Databases to Azure - Gianluca Sartori
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
 
SQL Server Clustering for Dummies
SQL Server Clustering for DummiesSQL Server Clustering for Dummies
SQL Server Clustering for Dummies
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
 
VMworld 2015: Advanced SQL Server on vSphere
VMworld 2015: Advanced SQL Server on vSphereVMworld 2015: Advanced SQL Server on vSphere
VMworld 2015: Advanced SQL Server on vSphere
 
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...
SharePoint is from Mars, SQL Server is from Venus (SQL Server for SharePoint ...
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
 

More from Gianluca Hotz

More from Gianluca Hotz (20)

Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
 
Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
 
SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & Performance
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query Processing
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database Ledger
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon AuroraCome utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
Come utilizzare AWS DMS per migrare SQL Server ad Amazon Aurora
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWS
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
Come utilizzare AWS Database Migration Service per migrare SQL Server ad Amaz...
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
SQL Server in AWS
SQL Server in AWSSQL Server in AWS
SQL Server in AWS
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
 
SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWS
 
SQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybaseSQL Server Data Virtualization with polybase
SQL Server Data Virtualization with polybase
 
SQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with PolybaseSQL Server Data Virtualization with Polybase
SQL Server Data Virtualization with Polybase
 

Recently uploaded

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
nirzagarg
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
HyderabadDolls
 
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
HyderabadDolls
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Nandurbar [ 7014168258 ] Call Me For Genuine Models...
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
Diamond Harbour \ Russian Call Girls Kolkata | Book 8005736733 Extreme Naught...
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 

Always on in sql server 2017

  • 1. #SQLSAT777 AlwaysOn in SQL Server 2017 Gianluca Hotz
  • 4. #SQLSAT777 Who am I? • Gianluca Hotz | @glhotz | ghotz@ugiss.org • Independent Consultant, Founder and Mentor SolidQ • 20+ years on SQL Server (from 4.21 in 1996) • Database modeling and development, sizing and administration, upgrade and migration, performance tuning • Interests • Relational model, DBMS architecture, Security, High Availability and Disaster Recovery • Community • 20 years Microsoft MVP SQL Server (from 1998) • Founder and President UGISS • User Group Italiano SQL Server (PASS Chapter)
  • 5. #SQLSAT777 Whats is AlwaysOn? • New name for HA and DR technologies • Failover Cluster Instance (FCI) • Availability Groups (AG) • Previously named HADRON • Keep in mind when searching articles • Still present in some DMVs (_hadr_)
  • 7. #SQLSAT777 FCI Review • Protects an entire SQL Server instance • All databases including system databases (logins, jobs, etc.) • Automatic failover (client connects to a VNN/IP Address) • Requires Shared Storage • Geographic DR with SQL Server < 2012 • Proprietary solutions for Stretch V-LAN • Proprietary solutions for storage replication • Multi-subnet support >=2012
  • 8. #SQLSAT777 Normal operations with AlwaysOn FCI Primary Site Shared Storage SQLCLUSTER SQL FCI Primary SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2
  • 9. #SQLSAT777 Node unavailability with AlwaysOn FCI Primary Site Shared Storage SQLCLUSTER SQL FCI Primary SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 CRASH
  • 10. #SQLSAT777 Multi-Subnet Support • Nodes on different subnets • IP Address resources in OR • Still need storage replication • (Enterprise Edition required) http://msdn.microsoft.com/en-us/library/ff878716.aspx
  • 11. #SQLSAT777 Multi-Subnet: how do clients reconnect? • New clients • Try IP addresses in order • Avoid DNS update latencies • New connection string parameter • MultiSubnetFailover=True • Try IP addresses in parallel • Old clients can be problematic… • Check driver support! • … OleDB Provider fixed 30 March 2018!! • https://blogs.msdn.microsoft.com/sqlnativeclient/2017/10/06/ann ouncing-the-new-release-of-ole-db-driver-for-sql-server • https://blogs.msdn.microsoft.com/sqlreleaseservices/released- microsoft-ole-db-driver-for-sql-server http://msdn.microsoft.com/en-us/library/ff878716.aspx
  • 12. #SQLSAT777 Multi-Subnet problem with old clients • Applies to • Libraries without support for MultiSubnetFailover • Connection strings that can’t be modified • Origin • Multiple IP registration in DNS • Library timeout < TCP timeout (15 vs 21 sec.) • Mitigation • Raise library timeout > 30-40 sec. (if possible) • Avoid registering all IPs (affects everyone) • Reduce DNS updates latency (HostRecordTTL) • Reduce DNS cache expiration on the client • For AG: implement both on separate Availability Groups http://msdn.microsoft.com/en-us/library/ff878716.aspx
  • 13. #SQLSAT777 Normal operation with multi-subnet Secondary Site Core Services Primary Site Shared Storage SQLCLUSTER Multi-subnet SQL FCI SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 Shared Storage SQL04 SAN02 10.2.0.20 SQL03 10.2.0.10 10.2.1.100 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 Proprietary Storage Replication
  • 14. #SQLSAT777 AlwaysOn FCI multi-subnet resilience Secondary Site Core Services Primary Site Shared Storage SQLCLUSTER Multi-subnet SQL FCI SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 Shared Storage SQL04 SAN02 10.2.0.20 SQL03 10.2.0.10 10.2.1.100 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 Proprietary Storage Replication CRASH CRASH CRASH
  • 15. #SQLSAT777 AlwaysOn FCI multi-subnet DR with HA Secondary Site Core Services Primary Site Shared Storage SQLCLUSTER Multi-subnet SQL FCI SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 Shared Storage SQL04 SAN02 10.2.0.20 SQL03 10.2.0.10 10.2.1.100 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 Proprietary Storage Replication CRASH CRASH CRASH CRASH
  • 16. #SQLSAT777 AlwaysOn FCI in SQL Server 2014 • Support for Windows Server 2012 CSV • Support for FCI in Sysprep • Same support as for Availability Groups in • sys.dm_hadr_cluster • sys.dm_hadr_cluster_members • sys.dm_hadr_cluster_networks • New DMV • sys.dm_io_cluster_valid_path_names
  • 17. #SQLSAT777 AlwaysOn FCI in SQL Server 2016 • Group Managed Service Accounts (gMSA) • Managed directly by AD • Automatic password rotation • SQL Server 2014 Supported on Windows Server 2012 R2 + hotfix
  • 18. #SQLSAT777 AlwaysOn FCI in SQL Server 2017 • Support for Linux
  • 20. #SQLSAT777 Data replicas review • Log Shipping • Database Mirroring • Replication • SQL Server 2012+: Availability Groups
  • 21. #SQLSAT777 Log Shipping • Advantages • Entire database replicas • Multiple replicas per database • Simple and robust • Disadvantages • Only asynchronous replicas • Readable replicas with trade-offs • Updated to last log restore • Need to disconnect clients before restoring
  • 22. #SQLSAT777 Database Mirroring • Advantages • Entire database replicas • Synchronous and asynchronous (EE) replicas • Simple and robust • Disadvantages • Only one replica per database • Readable replicas need Database Snapshot • Enterprise Edition • Updated to last snapshot creation time • Need to disconnect or handle multiple snapshot names
  • 23. #SQLSAT777 Replication • Advantages • More granular (depends on scenario) • Multiple replicas • Readable & updateable replicas • Disadvantages • More granular (depends on scenario) • Only asynchronous replicas • Typically higher latency • Complexity and maintenance overhead
  • 24. #SQLSAT777 Common Problems • Manual Failover* • No coordination to failover multiple DBs • No backups on replicas* • Specific limitations • E.g. FILESTREAM, cross-database consistency of transactions, only one replica
  • 25. #SQLSAT777 AG as evolution of Database Mirroring • Coordinated failover of multiple DBs • Multiple replicas (up to 4 initially)* • Synchronous/asynchronous replicas • Up-to-date readable replicas • Ability to off-load maintenance on replicas • e.g. backups
  • 27. #SQLSAT777 Normal operations with AlwaysOn AG Primary Site SQLCLUSTER Availability Group AG01 SQL02 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 SQLAG01 10.1.1.200 DAS DAS Primary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02
  • 28. #SQLSAT777 Node unavailability with AlwaysOn AG Primary Site SQLCLUSTER Availability Group AG01 SQL02 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 SQLAG01 10.1.1.200 DAS DAS Primary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 CRASH
  • 29. #SQLSAT777 AlwaysOn AG multi-subnet resilience Secondary SitePrimary Site SQLCLUSTER Availability Group AG01 Core Services SQL02 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 SQL04 10.2.0.20 SQL03 10.2.0.10 Quorum Witness Disk Share Node 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 SQLAG01 10.1.1.200 10.2.1.200 DAS DAS DAS DAS Primary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 CRASH
  • 30. #SQLSAT777 AlwaysOn AG multi-subnet DR with HA Secondary SitePrimary Site SQLCLUSTER Availability Group AG01 Core Services SQL02 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 SQL04 10.2.0.20 SQL03 10.2.0.10 Quorum Witness Disk Share Node 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 SQLAG01 10.1.1.200 10.2.1.200 DAS DAS DAS DAS Primary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 CRASH CRASH
  • 31. #SQLSAT777 Read-Only Access • Replicas roles • Primary: READ_WRITE|ALL • Secondary: NO|READ_ONLY|ALL • New connection property • ApplicationIntent • Name slightly different across client APIs • Read-Only Routing
  • 32. #SQLSAT777 AlwaysOn AG Topology Example A A Direct attached storage local, regional and geo secondaries A A Synchronous data movement Asynchronous data movement
  • 33. #SQLSAT777 Read-Only Access Capacity Planning • Synchronization latency of replica can raise • because of the read I/O activity • Impact on tempdb • Temporary statistics • Automatically created • Gone after failover • Read Committed Snapshot Isolation • 14 bytes added to rows at primary (on updates)
  • 34. #SQLSAT777 Problem with Replicas at Database level • Need Manual synchronization for objects outside database scope • New logins/users, Jobs, … • Solution for logins/users • Contained databases • Problem with ApplicationIntent=ReadOnly
  • 35. #SQLSAT777 Availability Groups in SQL Server 2014 • Up to 8 secondary replicas (was 4) • still only 2 can be in synchronous mode • Secondary readable replicas remain online • when disconnected from primary • When there’s a quorum loss • New DMV • sys.fn_hadr_is_primary_replica • Add Azure Replica Wizard
  • 36. #SQLSAT777 Availability Groups in SQL Server 2016 • Up to 3 synchronous replicas with automatic failover (was 2) • Enhanched database failover (fail on write transaction failure) • Secondary replica seeding (instead of backup/restore) • Read-only secondary replicas load balancing • MSDTC supported with Windows Server 2016 (cross-instance only) • Database encryption support (eg. SSIDB) • Cross-domain and domain-independent AG • Distributed AG • Log record transport re-written to be much faster
  • 37. #SQLSAT777 Scalability with Read-Only AG in SQL 2016 Async Log Synchronization OLTP workload
  • 38. #SQLSAT777 Scalability with Distributed AG in SQL 2016 AG2 Async Log Synchronization Distributed availability group AG1
  • 39. #SQLSAT777 Basic Availability Groups in SQL Server 2016 • Availabile with Standard Edition • Solution for deprecated Database Mirorring (almost…) • Limited to 2 replicas • Synchronous or asynchronous (DBM required EE for async!) • Replica can be in Azure • Limited to 1 database per Availability Group • Secondary replica not accessible • eg. read-only, backups…
  • 40. #SQLSAT777 AG Turbocharged in SQL Server 2016 • Problem • Performance not adequate in some synchronous replica scenarios • Higher scalability required with more/faster resources • Target: 95% performance with 1 synchronous replica • Many optimizations in SQL Server 2016 • Eg. reduced number of needed worker thread, use more parallelism, reduced contention • Results • 95% with 1 synchronous replica, 90% with 2 replicas
  • 41. #SQLSAT777 Availability Groups in SQL Server 2017 • Cross-database transaction support (MSDTC) • Minimum number of (sync) replica to commit • Clusterless sceanarios support • CLUSTER_TYPE = NONE • e.g. read-only scale out replicas not used for HA • Linux support • CLUSTER_TYPE = EXTERNAL (Pacemaker) • CLUSTER_TYPE = NONE • Cross-OS migration Windows-Linux supported
  • 43. AlwaysOn FCI+AG Secondary SitePrimary Site SQLCLUSTER Availability Group AG01 Core Services Shared Storage SQL FCI Primary SQL02 SAN01 SQLFCI01 ADMINWKS Router 10.1.0.20 SQL01 10.1.0.10 Quorum Witness Disk Share Node 10.1.1.100 10.1.1.50 Core Services DC01 DC02 10.1.0.1 10.1.0.2 Shared Storage SQL FCI Secondary SQL04 SAN02 SQLFCI02 10.2.0.20 SQL03 10.2.0.10 Quorum Witness Disk Share Node 10.2.1.100 10.2.1.50 DC03 DC04 10.2.0.1 10.2.0.2 SQLAG01 10.1.1.200 10.2.1.200 SQL Server Database Replication Primary Replica AGDB01 AGDB02 Secondary Replica AGDB01 AGDB02 CRASH CRASH CRASH
  • 46. #SQLSAT777 Other Hybrid Cloud Scenarios • Database Mirroring • VPN not needed for domain authentication • Can use certificate based authentication • Log Shipping
  • 47. #SQLSAT777 Choice based on business requirements Recovery Point Objective Recovery Time Objective SLA Requirements Resiliency Requirements Deployment Span Read/Write Scale-out Cost Of Deployment Environmental Constraints
  • 48. #SQLSAT777 «Zero downtime»? • Excellence in designing and planning • Excellence in execution • Application resiliency • Retry logic (exponential back-off) • Useful in other context (deadlocks, update conflicts)
  • 49. #SQLSAT777 Change in licensing • Software Assurance needed for passive servers • “Beginning with SQL Server 2014, each active server licensed with SA coverage allows the installation of a single passive server used for fail-over support.” • Right to run only one free passive secondary • “The active server license (s) must be covered with SA, and allow for one passive secondary SQL Server, with up to the same amount of compute as the licensed active server, only.” • Impacts everything: log shipping, mirroring, AG, FCI • SQL Server 2014-2017 Licensing Datasheets • http://download.microsoft.com/download/6/6/F/66FF3259-1466-4BBA-A505- 2E3DA5B2B1FA/SQL_Server_2014_Licensing_Datasheet.pdf • http://download.microsoft.com/download/F/D/5/FD5E5C28-6973-4273-8737- D69AA3BEA243/SQL_Server_2016_Licensing_Datasheet_EN_US.pdf • http://download.microsoft.com/download/7/8/c/78cdf005-97c1-4129-926b- ce4a6fe92cf5/sql_server_2017_licensing_guide.pdf • SQL Server 2017 Licensing Guide • http://download.microsoft.com/download/7/8/c/78cdf005-97c1-4129-926b- ce4a6fe92cf5/sql_server_2017_licensing_guide.pdf
  • 50. #SQLSAT777 AG Main Resources • Official documentation • https://docs.microsoft.com/en-us/sql/sql-server/failover- clusters/windows/always-on-failover-cluster-instances-sql-server • https://docs.microsoft.com/en-us/sql/database- engine/availability-groups/windows/always-on-availability- groups-sql-server • Blogs • CSS SQL Server Engineers • http://blogs.msdn.com/b/psssql/archive/tags/alwayson • SQL AlwaysOn Blog • http://blogs.msdn.com/b/sqlalwayson (stale)
  • 51. #SQLSAT777 AG Whitepapers series • 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 • 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 • AlwaysOn Solution Guide: Offloading Read-Only Workloads to Secondary Replicas • http://msdn.microsoft.com/en-us/library/jj542414.aspx • Cross-cluster Migration of AlwaysOn Availability Groups for Operating System Upgrades • http://msdn.microsoft.com/en-us/library/jj873730.aspx • Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery • http://msdn.microsoft.com/en-us/library/hh781257.aspx • Migration Guide: Migrating to AlwaysOn Availability Groups from Prior Deployments Combining Database Mirroring and Log Shipping • http://msdn.microsoft.com/en-us/library/jj635217.aspx • Multisite Failover Cluster Instance • http://sqlcat.com/sqlcat/b/whitepapers/archive/2011/12/22/sql-server-2012-alwayson_3a00_-multisite-failover-cluster-instance.aspx • SQL Server 2012 AlwaysOn High Availability and Disaster Recovery Design Patterns • http://sqlcat.com/sqlcat/b/msdnmirror/archive/2011/12/22/sql-server-2012-alwayson-high-availability-and-disaster-recovery-design- patterns.aspx
  • 52. #SQLSAT777 Resources SQL Server 2019 • Ignite 2018 Video • Architecting a highly available database platform with SQL Server • https://www.youtube.com/watch?v=5h1Xkh9CU-c