implementing sqlserver alwayson sarabpreet singh anand sql server – mvp sqlservergeeks.com (vp)
TRANSCRIPT
![Page 1: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/1.jpg)
Implementing SQLServer AlwaysON
Sarabpreet Singh AnandSQL Server – MVPSQLServerGeeks.com (VP)
DB
Mirroring
Log
Ship
pin
g
Clustering
![Page 2: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/2.jpg)
Sarabpreet Singh Anand
SQL Server MVP MCTS, MCITP: Admin, MCT certifications Vice President & Regional Mentor
SQLServerGeeks.com Expert in handling VLDBs & Disaster Management Conducted many SQL Server Boot camp Trainings across
India Regular Speaker:
UG Events, In-person Events & Webcasts Microsoft Community Tech Days (CTD),Etc
Follow Me @Sarab_SQLGeek Email : [email protected] [email protected]
![Page 3: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/3.jpg)
Why AlwaysONWhat is required to configure AlwaysONBenefits of AlwaysONHow AlwaysON worksDiff. TopologiesReadable SecondaryBackup on SecondaryDemo
How to implement\Configure AlwaysON Backups on Secondary Readable Secondaries
Agenda
![Page 4: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/4.jpg)
• Implement for Each DB• Either Sync\Aync – DBM• Single mirror DB Possible in DBM
• DB Failover• Single DB• No Automatic – LS• Need Witness for Automatic Failover– DBM
• Application Failover• Not So Easy – LS• With PartnerFailover Value – DBM
• Reporting\Backup• Reporting – just a workaround – also for limited
time only• No Backup Possible
Limitations in DB Mirroring & Log Shipping
![Page 5: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/5.jpg)
Windows Failover ClusterSQL Server 2012 Enterprise\Developer\Evaluation
EditionAll Nodes should be part of the same domain.Static IP for Listener (a DHCP also Works but….)*Same Drive Letters on all Nodes otherwise....*AlwaysON should be enabled on each SQL
Installation ServiceAll participating DBs should be in Full Recovery
model with minimum of One Full backup.Shared Folder*
What is required to configure AlwaysON
![Page 6: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/6.jpg)
Implementatio
n
• Multiple DBs
• Sync & Async
• Multiple DBs can
Failover together
• Automatic\Manual
Failover
• Transparent App
Failover
Configuration
• Multiple
Secondary
• Upto 4 Replicas
• Upto 3 Sync
• Upto 2 Automatic
Failover
• Automatically
creates a Listener
• Use Secondary for
reporting
• Use Secondary for
Backups
• Mix Sync\Async
• Builtin
Compression
• Builtin Encryption
• Shared & Non
Shared Disk
• Creates Auto Stats
for Secondary
• Upto 10 AGs and in
total upto 100 DBs
on an Instance.
Benefits of AlwaysON
![Page 7: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/7.jpg)
How AlwaysON Work
Clients connect to primary replica using Listener
A failover is initiated SQL-AG1 confirms failover and informs WSFC Bring SQL-AG1 offline
Clients are disconnected Brings SQL-AG2 online
AG & Listener resource moves to SQL-AG2 Clients are automatically redirected to SQL-
AG2 using Listener WSFC notify all secondary replicas
Secondaries reconnect to the new primary replicas mirroring endpoint and synchronization resumes
Availab
ilit
y
Gro
up
Lis
ten
er
![Page 8: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/8.jpg)
Topology Examples
A
A
Direct attached storage local, regional and geo secondaries
AA
Synchronous data movement
Asynchronous data movement
![Page 9: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/9.jpg)
Client connects to the Availability Group Listener
Standard connections are routed to the Primary server for read/write operations
ReadOnly connections are routed to a readable secondary based on ReadOnly routing configuration
Readable secondary Readonly routing
Availab
ilit
y
Gro
up
Lis
ten
er
![Page 10: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/10.jpg)
Backups can be done on any replica of a database to offload I/O from primary replica Transaction log backups, plus COPY_ONLY full backups
Backup jobs can be configured on all replicas and preferences set so that a job only runs on the preferred replica at that time This means no script/job changes are required after a failover
Transaction log backups done on all replicas form a single log chain
Readable SecondaryOffloading Backups To a Secondary
![Page 11: Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)](https://reader036.vdocuments.site/reader036/viewer/2022062322/56649c995503460f949557e6/html5/thumbnails/11.jpg)
Let’s see how to
How to Implement AlwaysON How to Failover AlwaysON Dashboard How to Configure
Backups on Secondaries Readable Secondaries Test Readable Routing Listener
Add DB to same AlwaysON Group