Log Shipping

Why Trust Techopedia

What Does Log Shipping Mean?

Log shipping is a feature of Microsoft’s SQL Server in which recorded changes to a database (logs) are automatically transferred to a replica database set up on a standby server. It is a powerful and useful tool for increasing database availability by maintaining a second warm database that can fill in reasonably quickly for a suddenly unavailable primary database.


Note that the ability to move database changes in real time from one database to another is not unique to SQL Server. Log shipping is simply Microsoft’s implementation of the concept.

Techopedia Explains Log Shipping

Log shipping is slightly different from database mirroring. It is an asynchronous movement of changes from one server to the other and can occur with a primary database’s changes being transferred to several standby databases. Also, in case of failure of the primary database, the failover to the standby database must be done manually.

Mirroring, on the other hand, is a real-time synchronization of changes, just as the name suggests – your image in the mirror raises its hand when you raise yours, and not a few minutes later! In mirroring, database failover is automated, unlike in log shipping.

So one may ask why log shipping is even necessary if mirroring is available. The short answer is cost. Mirroring can be quite expensive, since it usually needs a third server in addition to the primary and standby servers, as well as high-speed data links between the servers to ensure real-time copying of logs. Log shipping offers a sort of compromise between the high cost and automated redundancy, albeit with the following caveats:

  • Database failover is not automatic
  • The standby database is unavailable for editing.
  • There is some downtime while database administrators change over operations to the new server.
  • There is still the risk of some data loss if the last few minutes of data from the primary server were not copied through before becoming unavailable.

Log shipping is ideal for situations in which it is not absolutely critical to maintain 100% uptime.


Related Terms

Margaret Rouse
Senior Editor
Margaret Rouse
Senior Editor

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.