πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-300 Domain 5
Domain 5 β€” Module 6 of 6 100%
28 of 28 overall

DP-300 Study Guide

Domain 1: Plan and Implement Data Platform Resources

  • Choose Your Azure SQL Platform Free
  • Deploy and Configure Azure SQL Free
  • Scale, Performance, and Compression Free
  • Migration Planning: Online vs Offline Free
  • Execute and Troubleshoot Migrations Free

Domain 2: Implement a Secure Environment

  • Entra Authentication for Azure SQL
  • Security Principals, Permissions, and T-SQL
  • Encryption: TDE, Always Encrypted, and VBS Enclaves
  • Network Security: Firewalls, Private Links, and Endpoints
  • Data Classification and Auditing
  • Data Masking, Ledger, and Row-Level Security

Domain 3: Monitor, Configure, and Optimize Database Resources

  • Performance Baselines and Monitoring Tools
  • Database Watcher and Extended Events
  • Query Store: Configure and Monitor
  • Blocking, DMVs, and Execution Plans
  • Index and Query Optimization
  • Database Maintenance: Indexes, Statistics, and Integrity
  • Automatic Tuning and Performance Settings

Domain 4: Configure and Manage Automation of Tasks

  • Automation Landscape: What Runs Where
  • SQL Server Agent Jobs
  • Deploy with ARM, Bicep, PowerShell, and CLI
  • Elastic Jobs and Azure Automation

Domain 5: Plan and Configure an HA/DR Environment

  • HA/DR Strategy: RPO, RTO, and Architecture
  • Backup and Restore: Strategy and Native Tools
  • Point-in-Time Restore, LTR, and Cloud Backup
  • Geo-Replication and Failover Groups
  • Always On: Availability Groups and FCIs
  • Log Shipping and HA/DR Operations

DP-300 Study Guide

Domain 1: Plan and Implement Data Platform Resources

  • Choose Your Azure SQL Platform Free
  • Deploy and Configure Azure SQL Free
  • Scale, Performance, and Compression Free
  • Migration Planning: Online vs Offline Free
  • Execute and Troubleshoot Migrations Free

Domain 2: Implement a Secure Environment

  • Entra Authentication for Azure SQL
  • Security Principals, Permissions, and T-SQL
  • Encryption: TDE, Always Encrypted, and VBS Enclaves
  • Network Security: Firewalls, Private Links, and Endpoints
  • Data Classification and Auditing
  • Data Masking, Ledger, and Row-Level Security

Domain 3: Monitor, Configure, and Optimize Database Resources

  • Performance Baselines and Monitoring Tools
  • Database Watcher and Extended Events
  • Query Store: Configure and Monitor
  • Blocking, DMVs, and Execution Plans
  • Index and Query Optimization
  • Database Maintenance: Indexes, Statistics, and Integrity
  • Automatic Tuning and Performance Settings

Domain 4: Configure and Manage Automation of Tasks

  • Automation Landscape: What Runs Where
  • SQL Server Agent Jobs
  • Deploy with ARM, Bicep, PowerShell, and CLI
  • Elastic Jobs and Azure Automation

Domain 5: Plan and Configure an HA/DR Environment

  • HA/DR Strategy: RPO, RTO, and Architecture
  • Backup and Restore: Strategy and Native Tools
  • Point-in-Time Restore, LTR, and Cloud Backup
  • Geo-Replication and Failover Groups
  • Always On: Availability Groups and FCIs
  • Log Shipping and HA/DR Operations
Domain 5: Plan and Configure an HA/DR Environment Premium ⏱ ~12 min read

Log Shipping and HA/DR Operations

Configure log shipping for disaster recovery. Monitor HA/DR solutions and troubleshoot common failover and replication issues.

Log shipping and HA/DR operations

β˜• Simple explanation

Log shipping is like mailing carbon copies of a diary. Every few minutes, you photocopy the latest pages and send them to a backup location. The backup is always a few pages behind, but if the original is lost, you have almost everything.

It’s the simplest DR technology β€” no clustering, no special editions. Just backup, copy, restore. Repeat.

Log shipping automates the process of backing up transaction logs on a primary server, copying them to a secondary server, and restoring them. It provides a warm standby with RPO measured in minutes (depends on backup frequency). Available on SQL Server on Azure VMs.

Log shipping architecture

ComponentRole
Primary serverProduction database; automated log backups
Secondary serverStandby database; automated log restores
Monitor server(Optional) Tracks backup/restore status, alerts on failures
Backup jobSQL Agent job on primary β€” backs up the log to a shared location
Copy jobSQL Agent job on secondary β€” copies log files from the share
Restore jobSQL Agent job on secondary β€” restores the copied log files

Setting up log shipping

  1. Primary database must be in FULL recovery mode
  2. Take an initial full backup and restore it on the secondary with NORECOVERY
  3. Configure log shipping via SSMS wizard or T-SQL
  4. Three SQL Agent jobs are created automatically
-- On the primary: verify recovery model
ALTER DATABASE NorthStarDR SET RECOVERY FULL;

-- Take initial full backup
BACKUP DATABASE NorthStarDR TO DISK = 'C:\Backups\NorthStarDR_Full.bak' WITH INIT;

-- On the secondary: restore with NORECOVERY (standby)
RESTORE DATABASE NorthStarDR FROM DISK = '\\share\NorthStarDR_Full.bak'
WITH NORECOVERY;  -- or STANDBY = 'C:\StandbyFile.ldf' for read-only access

NORECOVERY vs STANDBY

ModeDatabase StateReadable?Use Case
NORECOVERYRestoring…NoPure standby β€” fastest restore, no user access
STANDBYStandby / Read-OnlyYes (read-only)Warm standby with reporting capability
ℹ️ Log shipping on Azure

Log shipping is primarily for SQL Server on Azure VMs:

  • Primary and secondary can be in different Azure regions (for DR)
  • Log files are typically stored on Azure Blob Storage or Azure File Share
  • SQL Agent runs the backup/copy/restore jobs
  • Azure SQL MI does NOT support user-configured log shipping (Azure manages replication internally)
  • Azure SQL Database does NOT support log shipping

Monitoring HA/DR solutions

What to monitor by solution

SolutionKey MetricsTools
Failover groupsReplication lag, failover status, grace periodAzure Portal, sys.dm_geo_replication_link_status
Geo-replicationReplication state, lag in secondssys.dm_geo_replication_link_status
Always On AGsSynchronization state, data loss, latencyAG Dashboard (SSMS), sys.dm_hadr_database_replica_states
FCIsCluster node status, quorum healthFailover Cluster Manager, sys.dm_os_cluster_nodes
Log shippingBackup/copy/restore job status, last restored filemsdb.dbo.log_shipping_monitor_* tables
Backups (general)Last backup time, backup size, durationmsdb.dbo.backupset, Azure Monitor

Key DMVs for HA/DR monitoring

-- AG replication status
SELECT
    ag.name AS ag_name,
    ar.replica_server_name,
    drs.synchronization_state_desc,
    drs.synchronization_health_desc,
    drs.log_send_queue_size,
    drs.redo_queue_size
FROM sys.dm_hadr_database_replica_states drs
JOIN sys.availability_replicas ar ON drs.replica_id = ar.replica_id
JOIN sys.availability_groups ag ON ar.group_id = ag.group_id;

-- Geo-replication status (Azure SQL DB)
SELECT partner_server, replication_state_desc, replication_lag_sec
FROM sys.dm_geo_replication_link_status;

-- Log shipping status
SELECT primary_server, secondary_server, last_backup_date, last_restore_date,
       DATEDIFF(MINUTE, last_restore_date, GETDATE()) AS minutes_behind
FROM msdb.dbo.log_shipping_monitor_secondary;

Troubleshooting HA/DR

ProblemLikely CauseInvestigation
AG secondary not synchronizingNetwork latency, redo queue backlog, log send queue fullCheck log_send_queue_size and redo_queue_size in DMVs
Failover group failover failedGrace period not elapsed, secondary not in syncCheck replication lag in Azure Portal; wait for grace period
Log shipping restore lag increasingCopy job failing, restore job slow, network bottleneckCheck Agent job history; verify file share connectivity
FCI failover took too longShared storage latency, cluster quorum issuesCheck Failover Cluster Manager events; verify storage health
Geo-secondary not readableReplication paused or brokenCheck sys.dm_geo_replication_link_status for state
After failover: logins missingLogins not synced between replicasSync logins using sp_help_revlogin or contained database users

Post-failover checklist

  1. Verify all databases are online on the new primary
  2. Check application connectivity β€” connection strings point to listener/failover group
  3. Verify logins and permissions β€” sync any missing logins
  4. Check SQL Agent jobs β€” jobs may need to be enabled on the new primary
  5. Monitor performance β€” the new primary may have different resource characteristics
  6. Plan failback β€” when the original primary recovers, plan the reverse failover
Question

What are the three SQL Agent jobs that log shipping creates?

Click or press Enter to reveal answer

Answer

1) Backup job (on primary β€” backs up the transaction log), 2) Copy job (on secondary β€” copies log files from the share), 3) Restore job (on secondary β€” restores the copied log files).

Click to flip back

Question

What DMV shows AG replication status including log send and redo queue sizes?

Click or press Enter to reveal answer

Answer

sys.dm_hadr_database_replica_states β€” shows synchronization_state, synchronization_health, log_send_queue_size, and redo_queue_size for each database in the AG.

Click to flip back

Question

What is the difference between NORECOVERY and STANDBY mode for log shipping?

Click or press Enter to reveal answer

Answer

NORECOVERY: database is in 'Restoring' state, not readable. STANDBY: database is read-only between restores β€” users can query it (but active connections are kicked during restore).

Click to flip back

Knowledge Check

Kenji's AG secondary shows a growing redo_queue_size and synchronization_state = 'NOT SYNCHRONIZING.' The log_send_queue_size is 0. What is the likely issue?

Knowledge Check

After an automatic failover group failover, Tomas discovers that SQL Server Agent jobs are running on the old primary but not on the new primary. What should he do?

🎬 Video coming soon

Congratulations β€” you’ve completed all 5 domains of DP-300! You’re now equipped with the knowledge to administer Azure SQL solutions: plan, secure, monitor, automate, and protect.

Good luck on your exam! πŸŽ“

← Previous

Always On: Availability Groups and FCIs

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.