powershelldba.de · Uwe Janke

Log Shipping: The Boring DR Option Nobody Talks About

Why log shipping is still the right answer for some disaster recovery scenarios: simpler than an Availability Group, works across editions, and the restore-with-standby trick that makes it almost readable.

Log shipping doesn't come up in conference talks. There's no listener, no automatic failover, no quorum vote, just a backup job, a copy job, and a restore job running on a schedule. That plainness is exactly why it's still the right choice for a meaningful slice of disaster recovery scenarios, and why it's worth knowing well instead of reflexively reaching for an Availability Group every time DR comes up.

What It Actually Is

Three SQL Server Agent jobs, running on a schedule you control:

  1. Backup on the primary: a transaction log backup, on an interval (every 5, 15, 30 minutes, whatever your recovery point objective demands).
  2. Copy to the secondary: moves the backup file across the network.
  3. Restore on the secondary: applies the log backup WITH NORECOVERY (or WITH STANDBY, see below), keeping the secondary database perpetually catching up.

That's the entire mechanism. No always-on connection is required between the two servers, if the network drops for an hour, backups just queue up and the copy job catches up once connectivity returns.

Where It Beats an Availability Group

Situation Why log shipping wins here
Standard Edition, or mixed editions Works on SQL Server Standard Edition; AGs (beyond Basic AG's single-database limitation) require Enterprise
High-latency or unreliable links No requirement for a continuously healthy connection or Windows Failover Clustering between sites
Simple audit and operational story Three Agent jobs anyone on the team can read and troubleshoot, versus AG's WSFC, quorum, and listener machinery
Multiple independent DR targets The same log backups can be shipped to several secondaries without additional cluster complexity
Delayed secondary as a safety net A restore job that intentionally lags by an hour protects against someone truncating data and that mistake replicating instantly, an AG's near-real-time sync doesn't give you that buffer

See Failover Clustering vs. SQL AlwaysOn for how these compare against the two AlwaysOn options; log shipping is the third leg of that stool, simpler than both, at the cost of manual failover and a real (if small) window of data loss between log backups.

The Restore-With-Standby Trick

Making the secondary almost readable: Restoring log backups WITH NORECOVERY leaves the database in a state nobody can query. Restoring WITH STANDBY = 'path\to\undo.tuf' instead brings the database up read-only between restores, using an undo file to hold uncommitted transactions that get rolled back again before the next log restore applies. Reports and ad-hoc queries can run against it in between restore cycles, giving you a reporting-offload option even without an Availability Group.
RESTORE LOG [MyDatabase]
FROM DISK = N'\\secondary\logshipping\MyDatabase_20260722_1400.trn'
WITH STANDBY = N'D:\LogShipping\MyDatabase_undo.tuf';

Each subsequent restore briefly undoes the standby state, applies the next log backup, and re-establishes standby mode, so the read-only window is real but not continuous, plan reporting queries around the restore schedule, not against it.

Failover Is Manual, and That's the Trade-Off

Common Gotchas

The Bottom Line

Log shipping doesn't compete with Availability Groups on features, it competes on simplicity, edition compatibility, and tolerance for unreliable networks. When automatic failover and near-zero data loss genuinely matter, an AG is worth its complexity. When they don't, and plenty of DR requirements genuinely don't, three Agent jobs anyone can read are often the more maintainable answer.