SlideShare a Scribd company logo
Microsoft Confidential
HADR with SQL Server 2016 AlwaysON
Session- 2 AlwaysON Architecture and internals
1
Uday Bhanu Pathaniya
PFE-SQL Server
udpathan@Microsoft.com
Microsoft Confidential
1. How AlwaysON works
2. What's AlwaysON Availability Groups /Replicas/ Listener
3. AlwaysON supportability and pre-requisites
4. Demo of AlwaysON HA Configuration
5. Backups on AlwaysON secondary replica
3
Legacy Architecture: Database Mirroring for local HA, Log
Shipping for DR
Pre-SQL
Server
2012
Challenges
Possible data loss in Log shipping.
Human intervention require in case of failover.
Unavailability of user databases during log restoration.
Can’t easily glue together databases that need to run on the same node
Data Warehouse load restrictions due to limitations in Log Shipping
Maintaining database mirroring connection strings (failover_partner) in all applications
is painful, and in some cases (some 3rd party applications) not even supported
Not easy to access data on mirrored server.
No. of nodes limitations in mirroring.
Interdependency of databases are not address in mirroring as well as in log shipping.
What is AlwaysOn ?
Is a combination of
database mirroring and
windows clustering.
Multiple mirrors with
multiple databases that
can failover together.
Single
gateway(Listener) can
be configure for
automatic failover
Nodes can be used to
offload the select query
workload and database
backup workload.
Single solution which
can address HA & DR
needs.
Primary Data Center
Disaster Recovery
Data Center
SQL Server
Primary
SQL Server
Secondary
Windows Server Failover Cluster (single WSFC crossing two data centers)
Availability Group
Synchronous
Asynchronous
SQL Server
Secondary
Grammar of AlwaysOn…
•Read-write , Online user database from primary Instance of database server.
•Databases added in availability in Availability groups are called availability databases & each Availability Database is a part of only single Availability Group.
•Backup of the primary database has to restore on secondary replica in norecovery state and new secondary database will remain in restoring state until it
is not joined to Availability group
Availability Database
•Logical container which logically binds the user databases which needs to be failover together.
•All the availability databases will failover together on same secondary replica.
•Single Availability Group can hosts multiple Availability Databases.
Availability Groups
•All the possible failover partners(must be a separate instance of SQL Server on other node) are known as Availability Replica.
•Each Availability replica is a copy of Availability database in a Availability Group.
•Each Availability replica is assigned an initial role- Primary or secondary. Primary replica hosts read-write user database & at least one secondary replica
hosts read-only user database.
Availability Replica
•There are two Modes- 1.) Synchronous-Commit mode & 2.) Asynchronous-Commit mode.
•In 1. Synchronous-commit primary replica wait for acknowledgement from synchronous-commit secondary replica that it has commit the transaction
in t-log of secondary database then after primary replica commit transaction.
•In 2. asynchronous-commit primary replica commit the transaction without waiting for acknowledgement from asynchronous-commit secondary
replica that it has commit the transaction.
•Asynchronous-commit mode minimizes transaction latency on the secondary databases but allows them to lag behind the primary databases, making
some data loss possible.
Availability mode
•With SQL Server AlwaysOn no need to have shared storage, but can use SAN, DAS, NAS or Local Disk depending on your budget and requirements.
AlwaysOn Storage
•Active secondary replica supports backup offloading on secondary replica and readable secondary replica.
•In backup offloading we can log backups , full backup of database , file or filegroup. Backup presences can be set on secondary replicas.
•An availability replica can be allow read-only access to its local databases when performing the secondary role.
•If an availability group currently possesses an availability group listener and one or more readable secondary replicas, SQL Server can route read-intent
connection requests to one of them (read-only routing
Active Secondary Replica
•Availability replica property:- How long the connection with another availability replica can remain inactive before the connection is close
Session-timeout period
Grammar of AlwaysOn.
• Availability group listener is a Virtual network name(VNN) to which
clients can connect in order to access a database in primary or
secondary replica.
• The physical instance name of SQL Server is hidden to clients while
accessing availability databases through listener.
• The client connection string does not to modify in order to access
either of Availability database base.
• We need DNS name for listener , a listener port designation one or
more IP address.
• Client use DNS to resolve VNN into multiple IP addresses and then tries
to connect with each IP address until the connection request successes
or timed out.
• If we configure read only routing then all read-intent connections are
redirected to readable secondary replica.
Availability
Group
listener
Connectivity with Availability Group Listener
Connect to the Primary Replica
Server=tcp: AGListener,1433;Database=MyDB;IntegratedSecurity=SSPI
Connect to Read-Only Secondary Replica
Server=tcp:AGListener,1433;Database=AdventureWorks;IntegratedSecurity=SSPI;ApplicationIntent=ReadOnly
Connect to Multisubnet failover
Server=tcp:AGListener,1433;Database=AdventureWorks;IntegratedSecurity=SSPI; MultiSubnetFailover=True
AlwaysON pre-requisites
KB
2654347:Hotfix
for .Net 3.5 SP1
Other Hotfix KB
2494036 for
optimal WSFC
quorum , KB
2687741 for
faster failover to
local relica etc.
Each node must
be configure
under
WSFC(preferably
node-fileshare).
A separate SQL
Server Instance
on each WSFC
node and enable
AlwaysOn feature
for each SQL
Server service.
Enterprise
edition of SQL
Server 2016
All the server
instances that
host availability
replicas for an
availability group
must use the
same SQL Server
collation.
No. of available
worker threads
are very
important.
Create endpoints
or member of
sysadmin
privileges require
DHCP IP can be
used but it is
recommended to
use static IPs.
AlwaysON Restrictions
• Restrictions for SQL Server failover cluster instance(FCI)
• The cluster nodes of an FCI can host only one replica for a given availability group
• FCIs do not support automatic failover by availability groups
• Changing FCI network name
• Restriction for SQL Server Availability Group
• Availability replicas must be hosted by different nodes of one WSFC cluster
• Unique availability group name
• Only 8 secondary replicas are supported. Either all can be configured as async
• commit mode or up to 3 can be configure as sync-commit mode
• Maximum number of availability groups and availability databases per computer depends on Hw
configuration. MS has tested 10AGs with 100 DBs per AG.
• Restriction for SQL Server Availability Databases
• If file path is different then
• New Availability Group Wizard/Add Database to Availability Group Wizard
• the database files must be RESTORED WITH MOVE on each instance of SQL Server that hosts a secondary
replica.
• A later add-file operation on the primary replica might fail on the secondary databases.
Demo-AlwaysON HA Configuration
Backups on AlwaysON secondary replica
• Copy-Only full backup of databases , files & filegroup is supported on secondary replica.
• Differentail backup is not supported on secondary replica.
• Backup log supports only regular backup & log chain remain consistent irrespective of backup log location or
availability mode( Synchronous-commit or Asynchronous-commit)
• Secondary replica must be in SYNCHRONIZED or SYNCHRONIZING state.
• In case of more than two nodes backup preferences(AG property) can be set to ‘Prefer Secondary’ , ‘Secondary
Only’ , ‘Primary’ ,’Any Replica’.
• Additionally Replica backup priorities can be set to ‘Server Instance’, ‘Backup Priory(Lowest=1, Highest=100)’ ,
Exclude Replica.
• It is recommended to configure script based backup jobs on each replica.
• Use the sys.fn_hadr_backup_is_preferred_replica function to determine whether the current replica is the
preferred backup replica or not.
• This function return 1 in case if the current replica is a preferred replica else 0.
AlwaysON Basics
Ad

More Related Content

What's hot (20)

High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
turgaysahtiyan
 
SQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster RecoverySQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster Recovery
Michael Poremba
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
SQL Server 2016 - Always On.pptx
SQL Server 2016 - Always On.pptxSQL Server 2016 - Always On.pptx
SQL Server 2016 - Always On.pptx
QuyVo27
 
SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)
Hamid J. Fard
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
Pini Dibask
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
Kirill Loifman
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
Vimlendu Kumar
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19c
Satishbabu Gunukula
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
Keith Hollman
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud Infrastructure
SinanPetrusToma
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
Ludovico Caldara
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
naderattia
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
Oracle RAC on Extended Distance Clusters - Presentation
Oracle RAC on Extended Distance Clusters - PresentationOracle RAC on Extended Distance Clusters - Presentation
Oracle RAC on Extended Distance Clusters - Presentation
Markus Michalewicz
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 
Real-Time Query for Data Guard
Real-Time Query for Data Guard Real-Time Query for Data Guard
Real-Time Query for Data Guard
Uwe Hesse
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availabil...
turgaysahtiyan
 
SQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster RecoverySQL Server High Availability and Disaster Recovery
SQL Server High Availability and Disaster Recovery
Michael Poremba
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
SQL Server 2016 - Always On.pptx
SQL Server 2016 - Always On.pptxSQL Server 2016 - Always On.pptx
SQL Server 2016 - Always On.pptx
QuyVo27
 
SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)SQL Server High Availability Solutions (Pros & Cons)
SQL Server High Availability Solutions (Pros & Cons)
Hamid J. Fard
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
Pini Dibask
 
Oracle 12c PDB insights
Oracle 12c PDB insightsOracle 12c PDB insights
Oracle 12c PDB insights
Kirill Loifman
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
Vimlendu Kumar
 
Why oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19cWhy oracle data guard new features in oracle 18c, 19c
Why oracle data guard new features in oracle 18c, 19c
Satishbabu Gunukula
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
Satishbabu Gunukula
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
Colin Charles
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
Keith Hollman
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud Infrastructure
SinanPetrusToma
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
Ludovico Caldara
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
naderattia
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
Oracle RAC on Extended Distance Clusters - Presentation
Oracle RAC on Extended Distance Clusters - PresentationOracle RAC on Extended Distance Clusters - Presentation
Oracle RAC on Extended Distance Clusters - Presentation
Markus Michalewicz
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 
Real-Time Query for Data Guard
Real-Time Query for Data Guard Real-Time Query for Data Guard
Real-Time Query for Data Guard
Uwe Hesse
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 

Viewers also liked (14)

Breaking Down and Understanding Office 365 - SPSJHB 2015
Breaking Down and Understanding Office 365 - SPSJHB 2015Breaking Down and Understanding Office 365 - SPSJHB 2015
Breaking Down and Understanding Office 365 - SPSJHB 2015
Michael Noel
 
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
 
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Michael Noel
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
Michael Noel
 
SharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOnSharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOn
Zeddy Iskandar
 
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groupsUnbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
serge luca
 
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
 
Symantec ApplicationHA June 2011
Symantec ApplicationHA June 2011Symantec ApplicationHA June 2011
Symantec ApplicationHA June 2011
Symantec
 
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
serge luca
 
SQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability GroupsSQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability Groups
Edwin M Sarmiento
 
Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...
Antonios Chatzipavlis
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
John Martin
 
SharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel OlesonSharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel Oleson
Joel Oleson
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012
Fadi Abdulwahab
 
Breaking Down and Understanding Office 365 - SPSJHB 2015
Breaking Down and Understanding Office 365 - SPSJHB 2015Breaking Down and Understanding Office 365 - SPSJHB 2015
Breaking Down and Understanding Office 365 - SPSJHB 2015
Michael Noel
 
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
 
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Ultimate SharePoint Infrastructure Best Practises Session - Isle of Man Share...
Michael Noel
 
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
AUDWC 2016 - Using SQL Server 20146 AlwaysOn Availability Groups for SharePoi...
Michael Noel
 
SharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOnSharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOn
Zeddy Iskandar
 
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groupsUnbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
Unbreakable SharePoint 2016 with SQL Server 2016 Always On Availability groups
serge luca
 
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
 
Symantec ApplicationHA June 2011
Symantec ApplicationHA June 2011Symantec ApplicationHA June 2011
Symantec ApplicationHA June 2011
Symantec
 
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
Unbreakable SharePoint 2013 with SQL Server Always On Availability Groups (HA...
serge luca
 
SQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability GroupsSQL Server 2012 High Availability with AlwaysOn Availability Groups
SQL Server 2012 High Availability with AlwaysOn Availability Groups
Edwin M Sarmiento
 
Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...Tips to install and manage always on availability groups in sql server 2012 &...
Tips to install and manage always on availability groups in sql server 2012 &...
Antonios Chatzipavlis
 
SQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New FeaturesSQL Server 2016 AlwaysOn Availability Groups New Features
SQL Server 2016 AlwaysOn Availability Groups New Features
John Martin
 
SharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel OlesonSharePoint Backup And Disaster Recovery with Joel Oleson
SharePoint Backup And Disaster Recovery with Joel Oleson
Joel Oleson
 
Always on in SQL Server 2012
Always on in SQL Server 2012Always on in SQL Server 2012
Always on in SQL Server 2012
Fadi Abdulwahab
 
Ad

Similar to AlwaysON Basics (20)

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
 
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
 
A Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability GroupsA Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability Groups
Pio Balistoy
 
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability GroupsSQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
turgaysahtiyan
 
MariaDB High Availability
MariaDB High AvailabilityMariaDB High Availability
MariaDB High Availability
MariaDB plc
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostech
Viktoria Bakos
 
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 ◄
 
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
Michael Noel
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspective
Ulf Wendel
 
07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx
KareemBullard1
 
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
 
HA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridHA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybrid
James Serra
 
Cnam azure 2014 storage
Cnam azure 2014   storageCnam azure 2014   storage
Cnam azure 2014 storage
Aymeric Weinbach
 
Oracle Dataguard
Oracle DataguardOracle Dataguard
Oracle Dataguard
Navneet Upneja
 
MariaDB High Availability Webinar
MariaDB High Availability WebinarMariaDB High Availability Webinar
MariaDB High Availability Webinar
MariaDB plc
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
Rishikesh Tiwari
 
Hadoop availability
Hadoop availabilityHadoop availability
Hadoop availability
Subhas Kumar Ghosh
 
Best Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDBBest Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDB
MariaDB plc
 
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideSQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
Lars Platzdasch
 
Sql server 2012 ha dr
Sql server 2012 ha drSql server 2012 ha dr
Sql server 2012 ha dr
Joseph D'Antoni
 
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
 
A Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability GroupsA Quick Guide to Sql Server Availability Groups
A Quick Guide to Sql Server Availability Groups
Pio Balistoy
 
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability GroupsSQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
SQLSaturday Bulgaria : HA & DR with SQL Server AlwaysOn Availability Groups
turgaysahtiyan
 
MariaDB High Availability
MariaDB High AvailabilityMariaDB High Availability
MariaDB High Availability
MariaDB plc
 
High availability solutions bakostech
High availability solutions bakostechHigh availability solutions bakostech
High availability solutions bakostech
Viktoria Bakos
 
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 ◄
 
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
SQL 2014 AlwaysOn Availability Groups for SharePoint Farms - SPS Sydney 2014
Michael Noel
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspective
Ulf Wendel
 
07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx07_DP_300T00A_HA_Disaster_Recovery.pptx
07_DP_300T00A_HA_Disaster_Recovery.pptx
KareemBullard1
 
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
 
HA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridHA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybrid
James Serra
 
MariaDB High Availability Webinar
MariaDB High Availability WebinarMariaDB High Availability Webinar
MariaDB High Availability Webinar
MariaDB plc
 
High Availbilty In Sql Server
High Availbilty In Sql ServerHigh Availbilty In Sql Server
High Availbilty In Sql Server
Rishikesh Tiwari
 
Best Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDBBest Practice for Achieving High Availability in MariaDB
Best Practice for Achieving High Availability in MariaDB
MariaDB plc
 
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideSQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
Lars Platzdasch
 
Ad

More from Harsh Chawla (8)

Alwayson AG enhancements
Alwayson AG enhancementsAlwayson AG enhancements
Alwayson AG enhancements
Harsh Chawla
 
Windows clustering and quorum basics
Windows clustering and quorum basicsWindows clustering and quorum basics
Windows clustering and quorum basics
Harsh Chawla
 
AlwaysON FCI
AlwaysON FCIAlwaysON FCI
AlwaysON FCI
Harsh Chawla
 
Query tuning optimization
Query tuning optimizationQuery tuning optimization
Query tuning optimization
Harsh Chawla
 
Storage spaces - for SQL Server Workloads
Storage spaces - for SQL Server WorkloadsStorage spaces - for SQL Server Workloads
Storage spaces - for SQL Server Workloads
Harsh Chawla
 
Pssdiag and sql nexus
Pssdiag and sql nexusPssdiag and sql nexus
Pssdiag and sql nexus
Harsh Chawla
 
Manage sql server proactively
Manage sql server proactivelyManage sql server proactively
Manage sql server proactively
Harsh Chawla
 
SQL Azure DB - BCDR
SQL Azure DB - BCDRSQL Azure DB - BCDR
SQL Azure DB - BCDR
Harsh Chawla
 
Alwayson AG enhancements
Alwayson AG enhancementsAlwayson AG enhancements
Alwayson AG enhancements
Harsh Chawla
 
Windows clustering and quorum basics
Windows clustering and quorum basicsWindows clustering and quorum basics
Windows clustering and quorum basics
Harsh Chawla
 
Query tuning optimization
Query tuning optimizationQuery tuning optimization
Query tuning optimization
Harsh Chawla
 
Storage spaces - for SQL Server Workloads
Storage spaces - for SQL Server WorkloadsStorage spaces - for SQL Server Workloads
Storage spaces - for SQL Server Workloads
Harsh Chawla
 
Pssdiag and sql nexus
Pssdiag and sql nexusPssdiag and sql nexus
Pssdiag and sql nexus
Harsh Chawla
 
Manage sql server proactively
Manage sql server proactivelyManage sql server proactively
Manage sql server proactively
Harsh Chawla
 
SQL Azure DB - BCDR
SQL Azure DB - BCDRSQL Azure DB - BCDR
SQL Azure DB - BCDR
Harsh Chawla
 

Recently uploaded (20)

Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 

AlwaysON Basics

  • 1. Microsoft Confidential HADR with SQL Server 2016 AlwaysON Session- 2 AlwaysON Architecture and internals 1
  • 3. Microsoft Confidential 1. How AlwaysON works 2. What's AlwaysON Availability Groups /Replicas/ Listener 3. AlwaysON supportability and pre-requisites 4. Demo of AlwaysON HA Configuration 5. Backups on AlwaysON secondary replica 3
  • 4. Legacy Architecture: Database Mirroring for local HA, Log Shipping for DR
  • 5. Pre-SQL Server 2012 Challenges Possible data loss in Log shipping. Human intervention require in case of failover. Unavailability of user databases during log restoration. Can’t easily glue together databases that need to run on the same node Data Warehouse load restrictions due to limitations in Log Shipping Maintaining database mirroring connection strings (failover_partner) in all applications is painful, and in some cases (some 3rd party applications) not even supported Not easy to access data on mirrored server. No. of nodes limitations in mirroring. Interdependency of databases are not address in mirroring as well as in log shipping.
  • 6. What is AlwaysOn ? Is a combination of database mirroring and windows clustering. Multiple mirrors with multiple databases that can failover together. Single gateway(Listener) can be configure for automatic failover Nodes can be used to offload the select query workload and database backup workload. Single solution which can address HA & DR needs.
  • 7. Primary Data Center Disaster Recovery Data Center SQL Server Primary SQL Server Secondary Windows Server Failover Cluster (single WSFC crossing two data centers) Availability Group Synchronous Asynchronous SQL Server Secondary
  • 8. Grammar of AlwaysOn… •Read-write , Online user database from primary Instance of database server. •Databases added in availability in Availability groups are called availability databases & each Availability Database is a part of only single Availability Group. •Backup of the primary database has to restore on secondary replica in norecovery state and new secondary database will remain in restoring state until it is not joined to Availability group Availability Database •Logical container which logically binds the user databases which needs to be failover together. •All the availability databases will failover together on same secondary replica. •Single Availability Group can hosts multiple Availability Databases. Availability Groups •All the possible failover partners(must be a separate instance of SQL Server on other node) are known as Availability Replica. •Each Availability replica is a copy of Availability database in a Availability Group. •Each Availability replica is assigned an initial role- Primary or secondary. Primary replica hosts read-write user database & at least one secondary replica hosts read-only user database. Availability Replica •There are two Modes- 1.) Synchronous-Commit mode & 2.) Asynchronous-Commit mode. •In 1. Synchronous-commit primary replica wait for acknowledgement from synchronous-commit secondary replica that it has commit the transaction in t-log of secondary database then after primary replica commit transaction. •In 2. asynchronous-commit primary replica commit the transaction without waiting for acknowledgement from asynchronous-commit secondary replica that it has commit the transaction. •Asynchronous-commit mode minimizes transaction latency on the secondary databases but allows them to lag behind the primary databases, making some data loss possible. Availability mode •With SQL Server AlwaysOn no need to have shared storage, but can use SAN, DAS, NAS or Local Disk depending on your budget and requirements. AlwaysOn Storage •Active secondary replica supports backup offloading on secondary replica and readable secondary replica. •In backup offloading we can log backups , full backup of database , file or filegroup. Backup presences can be set on secondary replicas. •An availability replica can be allow read-only access to its local databases when performing the secondary role. •If an availability group currently possesses an availability group listener and one or more readable secondary replicas, SQL Server can route read-intent connection requests to one of them (read-only routing Active Secondary Replica •Availability replica property:- How long the connection with another availability replica can remain inactive before the connection is close Session-timeout period
  • 9. Grammar of AlwaysOn. • Availability group listener is a Virtual network name(VNN) to which clients can connect in order to access a database in primary or secondary replica. • The physical instance name of SQL Server is hidden to clients while accessing availability databases through listener. • The client connection string does not to modify in order to access either of Availability database base. • We need DNS name for listener , a listener port designation one or more IP address. • Client use DNS to resolve VNN into multiple IP addresses and then tries to connect with each IP address until the connection request successes or timed out. • If we configure read only routing then all read-intent connections are redirected to readable secondary replica. Availability Group listener
  • 10. Connectivity with Availability Group Listener Connect to the Primary Replica Server=tcp: AGListener,1433;Database=MyDB;IntegratedSecurity=SSPI Connect to Read-Only Secondary Replica Server=tcp:AGListener,1433;Database=AdventureWorks;IntegratedSecurity=SSPI;ApplicationIntent=ReadOnly Connect to Multisubnet failover Server=tcp:AGListener,1433;Database=AdventureWorks;IntegratedSecurity=SSPI; MultiSubnetFailover=True
  • 11. AlwaysON pre-requisites KB 2654347:Hotfix for .Net 3.5 SP1 Other Hotfix KB 2494036 for optimal WSFC quorum , KB 2687741 for faster failover to local relica etc. Each node must be configure under WSFC(preferably node-fileshare). A separate SQL Server Instance on each WSFC node and enable AlwaysOn feature for each SQL Server service. Enterprise edition of SQL Server 2016 All the server instances that host availability replicas for an availability group must use the same SQL Server collation. No. of available worker threads are very important. Create endpoints or member of sysadmin privileges require DHCP IP can be used but it is recommended to use static IPs.
  • 12. AlwaysON Restrictions • Restrictions for SQL Server failover cluster instance(FCI) • The cluster nodes of an FCI can host only one replica for a given availability group • FCIs do not support automatic failover by availability groups • Changing FCI network name • Restriction for SQL Server Availability Group • Availability replicas must be hosted by different nodes of one WSFC cluster • Unique availability group name • Only 8 secondary replicas are supported. Either all can be configured as async • commit mode or up to 3 can be configure as sync-commit mode • Maximum number of availability groups and availability databases per computer depends on Hw configuration. MS has tested 10AGs with 100 DBs per AG. • Restriction for SQL Server Availability Databases • If file path is different then • New Availability Group Wizard/Add Database to Availability Group Wizard • the database files must be RESTORED WITH MOVE on each instance of SQL Server that hosts a secondary replica. • A later add-file operation on the primary replica might fail on the secondary databases.
  • 14. Backups on AlwaysON secondary replica • Copy-Only full backup of databases , files & filegroup is supported on secondary replica. • Differentail backup is not supported on secondary replica. • Backup log supports only regular backup & log chain remain consistent irrespective of backup log location or availability mode( Synchronous-commit or Asynchronous-commit) • Secondary replica must be in SYNCHRONIZED or SYNCHRONIZING state. • In case of more than two nodes backup preferences(AG property) can be set to ‘Prefer Secondary’ , ‘Secondary Only’ , ‘Primary’ ,’Any Replica’. • Additionally Replica backup priorities can be set to ‘Server Instance’, ‘Backup Priory(Lowest=1, Highest=100)’ , Exclude Replica. • It is recommended to configure script based backup jobs on each replica. • Use the sys.fn_hadr_backup_is_preferred_replica function to determine whether the current replica is the preferred backup replica or not. • This function return 1 in case if the current replica is a preferred replica else 0.

Editor's Notes

  • #2: © 2015 Microsoft Corporation Microsoft Confidential
  • #4: © 2015 Microsoft Corporation Microsoft Confidential
  • #5: To achieve automatic failover, synchronous database mirroring with a witness (a third SQL Server instance) is configured. When zero data loss is required, the database mirroring high-safety mode (synchronous) setting is enabled to help ensure zero data loss between the two servers located in the primary data center. To improve database availability within the primary data center, a third SQL Server instance is configured to act as a witness to enable automatic failover between the database mirroring partners. Log shipping is used for disaster recovery and log shipping involves ongoing transaction log backups of the principal database. These transaction log backups are then copied to a SQL Server instance in the disaster recovery data center. Incoming transaction log backups are restored in sequence on an ongoing basis. You could also choose to configure log shipping for read-only workloads, but with the drawback that read-only connections must be disconnected before incoming transaction log backups are applied.
  • #9: Availability Databases To add a database to an availability group, the database must be an online, read-write database that exists on the server instance that hosts the primary replica. When you add a database, it joins the availability group as a primary database, while remaining available to clients. No corresponding secondary database exists until backups of the new primary database are restored to the server instance that hosts the secondary replica (using RESTORE WITH NORECOVERY). The new secondary database is in the RESTORING state until it is joined to the availability group Session-Timeout Period The session-timeout period is an availability-replica property that determines how long connection with another availability replica can remain inactive before the connection is closed. The primary and secondary replicas ping each other to signal that they are still active. Receiving a ping from the other replica during the timeout period indicates that the connection is still open and that the server instances are communicating. On receiving a ping, an availability replica resets its session-timeout counter on that connection. The session-timeout period prevents either replica from waiting indefinitely to receive a ping from the other replica. If no ping is received from the other replica within the session-timeout period, the replica times out. Its connection is closed, and the timed-out replica enters the DISCONNECTED state. Even if a disconnected replica is configured for synchronous-commit mode, transactions will not wait for that replica to reconnect and resynchronize. The default session-timeout period for each availability replica is 10 seconds. This value is user-configurable, with a minimum of 5 seconds. Generally, we recommend that you keep the time-out period at 10 seconds or greater. Setting the value to less than 10 seconds creates the possibility of a heavily loaded system declaring a false failure.
  • #10: A unique DNS name This is also known as a Virtual Network Name (VNN). Active Directory naming rules for DNS host names apply. One or more Virtual IP addresses (VIPs)VIPs are configured for one or more subnets to which the availability group can failover. IP address configurationFor a given availability group listener, the IP address uses either Dynamic Host Configuration Protocol (DHCP) or one or more static IP addresses. Dynamic Host Configuration Protocol (DHCP) If an availability group resides on a single subnet, you can configure all the availability group listener IP addresses to use DHCP. For pre-production environments, DHCP offers an easy setup for an availability group that does not require disaster recovery to a remote site on a separate subnet. However, you should not use DHCP in conjunction with an availability group listener in a production environment. This is because, in the event of down time, if the DHCP IP lease expires, extra time is required to re-register the new DHCP IP address associated with the listener DNS name. The extra time will cause client-connection failure. Static IP addresses In production environments, we recommend that availability group listeners use static IP addresses. Furthermore, where availability groups extend across subnets in a multi-subnet domain, an availability group listener must use static IP addresses. Port Consideration You can also designate a non-standard listener port; however this means that you will also need to explicitly specify a target port in your connection string whenever connecting to the availability group listener. You will also need to open permission on the firewall for the non-standard port. If you use the default port of 1433 for availability group listener VNNs, you will still need to ensure that no other services on the cluster node are using this port; otherwise this would cause a port conflict. If one of the instances of SQL Server is already listening on TCP port 1433 via the instance listener and there are no other services (including additional instances of SQL Server) on the computer listening on port 1433, this will not cause a port conflict with the availability group listener. This is because the availability group listener can share the same TCP port inside the same service process. However multiple instances of SQL Server (side-by-side)should not be configured to listen on the same port.
  • #11: Using a Listener to Connect to a Read-Only Secondary Replica (Read-Only Routing) Read-only routing refers to the ability of SQL Server to route incoming connections to an availability group listener to a secondary replica that is configured to allow read-only workloads. An incoming connection referencing an availability group listener name can automatically be routed to a read-only replica if the following are true: At least one secondary replica is set to read-only access, and each read-only secondary replica and the primary replica are configured to support read-only routing. The connection string references an availability group listener, and the application intent of the incoming connection is set to read-only (for example, by using the Application Intent=ReadOnly keyword in the ODBC or OLEDB connection strings or connection attributes or properties
  • #12: Thread considerations The maximum number of threads used by availability groups is the configured setting for the maximum number of server threads ('max worker threads') minus 40. he availability replicas hosted on a given server instance share a single thread pool. Threads are shared on an on-demand basis, as follows: Typically, there are 3–10 shared threads, but this number can increase depending on the primary replica workload. If a given thread is idle for a while, it is released back into the general SQL Server thread pool. Normally, an inactive thread is released after ~15 seconds of inactivity. However, depending on the last activity, an idle thread might be retained longer. In addition, availability groups use unshared threads, as follows: Each primary replica uses 1 Log Capture thread for each primary database. In addition, it uses 1 Log Send thread for each secondary database. Log send threads are released after ~15 seconds of inactivity. Each secondary replica uses 1 redo thread for each secondary database. Redo threads are released after ~15 seconds of inactivity. A backup on a secondary replica holds a thread on the primary replica for the duration of the backup operation.
  • #13: Thread considerations The maximum number of threads used by availability groups is the configured setting for the maximum number of server threads ('max worker threads') minus 40. he availability replicas hosted on a given server instance share a single thread pool. Threads are shared on an on-demand basis, as follows: Typically, there are 3–10 shared threads, but this number can increase depending on the primary replica workload. If a given thread is idle for a while, it is released back into the general SQL Server thread pool. Normally, an inactive thread is released after ~15 seconds of inactivity. However, depending on the last activity, an idle thread might be retained longer. In addition, availability groups use unshared threads, as follows: Each primary replica uses 1 Log Capture thread for each primary database. In addition, it uses 1 Log Send thread for each secondary database. Log send threads are released after ~15 seconds of inactivity. Each secondary replica uses 1 redo thread for each secondary database. Redo threads are released after ~15 seconds of inactivity. A backup on a secondary replica holds a thread on the primary replica for the duration of the backup operation.
  • #15: The AlwaysOn Availability Groups active secondary capabilities include support for performing backup operations on secondary replicas. Backup operations can put significant strain on I/O and CPU (with backup compression). Offloading backups to a synchronized or synchronizing secondary replica allows you to use the resources on server instance that hosts the primary replica for your tier-1 workloads. Note that copy-only backups do not impact the log chain or clear the differential bitmap.
  • #16: The AlwaysOn Availability Groups active secondary capabilities include support for performing backup operations on secondary replicas. Backup operations can put significant strain on I/O and CPU (with backup compression). Offloading backups to a synchronized or synchronizing secondary replica allows you to use the resources on server instance that hosts the primary replica for your tier-1 workloads. Note that copy-only backups do not impact the log chain or clear the differential bitmap.