Implement a disaster recovery solution
for your on-prem SQL with Azure? Easy!
Marco Obinu
Sponsors
Gold Sponsors:
Global SQLSaturday Partner
PASS
Silver Sponsors:
Global SQLSaturday Supporters:
About me
Marco Obinu
Advisory Engineer
SoftJam S.p.A.
• Geek to the bone 
• Microsoft Azure MVP
ABOUTME.OMEGAMADLAB.COM
Agenda
• Back to the basics
• Native BCDR technologies in a hybrid scenario
Back to the basics
Let’s start with some terms…
Allowable data loss Time required to recover
Disaster
R P O R T O
RTO - RPO
COSTS - COMPLEXITY
Why using Azure as a DR site?
Why using Azure as a DR site?
Costs
Complexity
Effort Benefits
Why using Azure as a DR site?
Costs
Complexity
Effort Benefits
Why using Azure as a DR site?
Why using Azure as a DR site?
New tech
Why using Azure as a DR site?
Why using Azure as a DR site?
Costs
Complexity
Effort New tech Benefits
What about licensing costs?
SQL 2017 (SA)
SQL 2019 (SA)
Infrastructure-as-a-Service model
MANAGEDBYVENDOR
MANAGEDBYVENDOR
MANAGEDBY
VENDOR
APPLICATION
HYPERVISOR
OS
RUNTIME
DATA
STORAGE
NETWORK
TRADITIONAL IT
APPLICATION
HYPERVISOR
OS
RUNTIME
DATA
STORAGE
NETWORK
IaaS
YOUMANAGE
SERVERS SERVERS
APPLICATION
HYPERVISOR
OS
RUNTIME
DATA
STORAGE
NETWORK
PaaS
YOUMANAGE
SERVERS
APPLICATION
HYPERVISOR
OS
RUNTIME
DATA
STORAGE
NETWORK
SaaS
SERVERS
YOUMANAGE
Azure SQL VMs
Native BCDR technologies
in a hybrid scenario
Native BCDR technologies in a hybrid scenario
Backup to URL
Backup to URL
ON-PREMISES
AZURE
Storage
Account
Supported Version/Edition
Recovery Model
Complexity
RPO
RTO
Data access on DR site
SQL 2012 SP1 CU2+ any edition
Any
Low to implement, High to recover
Depends on workload and network
😥
Backup files
Azure
SQL VM
Disaster
Log Shipping
Log Shipping
ON-PREMISES
AZURE
Supported Version/Edition
Recovery Model
Complexity
RPO
RTO
Data access on DR site
Any version/ed. with the SQL Agent
Full
High
Depends on workload, scheduled
tasks and network
Azure
SQL VM
DC
DC
VPN
Backup/copy
T-LOG
Restore
T-LOG
Log Shipping
ON-PREMISES
AZURE
Supported Version/Edition
Recovery Model
Complexity
RPO
RTO
Data access on DR site
Any version/ed. with the SQL Agent
Full
High
Depends on workload, scheduled
tasks and network
😐
Stand-by mode 😐
Azure
SQL VM
DC
DC
VPN
Backup/copy
T-LOG
Restore
T-LOG
Disaster
Log Shipping – custom
ON-PREMISES
AZURE
Azure
SQL VM
Backup to
URL
Restore
from
URL
Storage
Account
Database
Mirroring
Database Mirroring
ON-PREMISES
AZURE
Supported Version/Edition
Recovery Model
Complexity
RPO
RTO
Data access on DR site
SQL 2005+ Enterprise Edition
Full
Moderate
🙂
🙂
Database snapshots
Azure
SQL VM
DC
DC
VPN
Principal
Mirror
Disaster
Availability
Groups
Availability Groups
ON-PREMISES
AZURE
Supported Version/Edition
Recovery Model
Complexity
RPO
RTO
Data access on DR site
SQL 2012+ Enterprise Edition
Full
Moderate
😍
Azure
SQL VM
DC
DC
VPN
Primary Secondary
😍
Readable secondary
SYNC
Listener
Always On AG anatomy
network subnet
AG Listener
VNN IP
On-prem network
VNN IP
Cluster quorum
Vote = 1
Node 1
Cluster UP
Vote = 1
Node 2
Cluster UP
Vote = 1
Node 3
Cluster UP
Vote = 1
Node 1
Cluster DOWN
Azure networkOn-prem network
Always On AG anatomy
VNN IP2IP1
AG Listener
VNN IP2IP1
Azure networking for clusters
Cluster Node
IP
Cluster IP
resource
IP
Cluster Node
IP
Cluster IP
resource
IP
On-premises Azure
Azure networking for clusters
Cluster Node
IP
Cluster IP
resource
IP
Cluster Node
IP
Cluster IP
resource
IP
On-premises Azure
Azure Load
Balancer
Azure vnet
Always On AG – failover mechanism
On-prem network
Users Reports
Read-onlyRead-only
Always On Distributed AG (SQL2016+)
Azure vnetOn-prem network
WSFC1 WSFC2
Distributed Availability Group
VNN IP VNN IP
AG Listener
VNN IP
AG Listener
VNN IP
Azure vnetOn-prem network
AG Listener
VNN IP2IP1
VNN IP2IP1
Always On BAG
• SQL Server 2016 Standard or
newer
• One database for AG
• A single non-readable replica
• Sync or Async replication
• Suitable when you have a few
databases to protect
Always On BAG
• SQL Server 2016 Standard or
newer
• One database for AG
• A single non-readable replica
• Sync or Async replication
• Suitable when you have a few
databases to protect
Azure vnetOn-prem network
AG Listener
VNN IP2IP1
VNN IP2IP1
AG Listener 2
VNN 2 IP4IP3
Mixing AGs with Failover Cluster Instances
network subnet
Azure subnetOn-prem network
VNN IP2IP1
AG Listener
VNN IP2IP1
SQL FCI
https://youtu.be/BFthrDFEDL4
Azure Site
Recovery
Azure Site Recovery
ON-PREMISES
Primary Secondary
SYNC
AZURE
Azure
SQL VM
ASYNC
ASR Replication
Azure Site Recovery
Web server
Azure Site Recovery
ON-PREMISES
AZURE
ASR Replication
ASR Replication
Azure Site Recovery
Web server
Azure Site Recovery
ON-PREMISES
Mirror
SYNC
AZURE
ASR Replication
ASR Replication
SQL FCI
Azure Site Recovery
Web server
Resources
Demo FCI + BAG with SQL Standard Edition
https://github.com/OmegaMadLab/FCI_and_AG
https://youtu.be/BFthrDFEDL4
Official docs
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-
sql-high-availability-dr?WT.mc_id=DP-MVP-5003770
SQL backup to Azure Blob Storage cheat sheet:
https://techcommunity.microsoft.com/t5/DataCAT/SQL-Server-Backup-to-URL-a-cheat-sheet/ba-
p/346358
Official docs FCI + AG:
https://docs.microsoft.com/it-it/sql/database-engine/availability-groups/windows/failover-clustering-
and-always-on-availability-groups-sql-server?WT.mc_id=DP-MVP-5003770
DBATools
https://dbatools.io
SQL Server 2019 licensing sheet
https://download.microsoft.com/download/6/6/0/66078040-86d8-4f6e-b0c5-
e9919bbcb537/SQL%20Server%202019%20Licensing%20guide.pdf

Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!