SQL Server Log Shipping
Introduction
When a database goes down, the real question isn’t if you can recover — it’s how fast and how much data you can afford to lose. That’s where Disaster Recovery (DR) stops being theory and starts being an SLA discussion.
SQL Server offers multiple HA/DR options, but Log Shipping remains one of the most practical and widely used DR solutions — simple, predictable, and available even on Standard Edition. Despite being considered “old-school,” it is still highly relevant in real-world environments where cost, control, and reliability matter.
In this article, we’ll break down Log Shipping from a DBA’s perspective: what it is, when it makes sense, when it doesn’t, and how it compares to other HA/DR technologies like Database Mirroring and Availability Groups. We’ll also walk through a step-by-step configuration, discuss RPO/RTO implications, and clarify common misconceptions along the way.
If you want to truly understand Log Shipping as a DR solution — not just click through a wizard — this guide is for you.
Log shipping overview
SQL Server Log Shipping allows you to automatically ship transaction log backups from a primary database on a primary SQL Server instance to one or more secondary databases hosted on separate instances. Each transaction log backup is applied individually to the secondary databases.
An optional third instance, known as the monitor server, tracks the history and status of backup, copy, and restore operations and can raise alerts if these operations fail to run as scheduled.
Log shipping consists of 3 operations:
These operations are executed through SQL Server Agent jobs. In the example shown below, GLADIATOR acts as the primary instance, while ROCKY serves as the secondary instance.
What is an SLA?
A service level agreement (SLA) is a contract between a service provider and a customer that defines the service to be provided and the level of performance to be expected. An SLA also describes how performance will be measured and approved, and what happens if performance levels are not met. — IBM
Why SLA matters?
Before choosing High Availability (HA) and Disaster Recovery (DR) solutions, it’s crucial to agree with stakeholders on the expected service levels. Understanding how much downtime and data loss is acceptable is essential before designing your environment.
RPO and RTO: What They Are and Why They Matter
Recovery Point Objective (RPO)
Example: An RPO of 15 minutes means you cannot afford to lose more than 15 minutes of data.
Recovery Time Objective (RTO)
Example: An RTO of 2 hours means services must be back online within 2 hours of an outage.
Why it matters for Log Shipping
Terms and definitions
Recommended by LinkedIn
When to Use Log Shipping
When NOT to Use Log Shipping
Log Shipping VS other HA/DR solutions
Practice
3. Open Backup Settings and specify a network share or local folder path for transaction log backups.
Ensure that SQL Server Agent services on both servers have read/write access to this location.
Even if the backup folder is on the same host, you must explicitly provide the path.
4. Adjust the Backup Schedule as required by your SLA.
5. Click OK, then from the main Log Shipping page select Add Secondary Server Instance, click Connect, and choose the secondary instance.
6. Navigate to the Copy Files section:
7. Navigate to the Restore Transaction Log section:
8. Click OK to complete the configuration.
Optional: You may configure a monitor server to track backup, copy, and restore activity, as well as failure alerts. By default, a monitor instance is not required.
Great job, keep going