Monday, 20 February 2023

What is the Log Shipping in SQL Server?

Log shipping is a disaster recovery solution for SQL Server that involves copying and restoring transaction log backups from a primary database server to one or more secondary database servers. The purpose of log shipping is to maintain a warm standby database on a secondary server that can be quickly activated in the event of a primary server failure or disaster.

Here's how log shipping works:

  1. On the primary server, transaction logs are backed up and copied to a shared location that is accessible by the secondary server.

  2. On the secondary server, the transaction logs are restored to a standby database, which is kept in a recovery mode that allows additional transaction logs to be applied as they become available.

  3. The secondary database can be configured to stay in a read-only state or in standby mode, which allows users to query the database, but not modify it.

  4. In the event of a primary server failure or disaster, the secondary database can be activated, and users can begin using it for read and write operations.


Log shipping provides a relatively low-cost disaster recovery solution for SQL Server, as it requires only standard backup and restore operations, and can be configured with built-in SQL Server functionality. However, log shipping does have some limitations, such as the potential for data loss if the transaction log backups are not frequent enough, and the need for manual failover and failback operations. As such, log shipping is typically used in conjunction with other disaster recovery solutions, such as clustering or Always On Availability Groups.

 

No comments:

Post a Comment

AdSense

The Ultimate Guide to Interceptors: Understanding Their Power and Functionality

  The Ultimate Guide to Interceptors: Understanding Their Power and Functionality An interceptor is a service that can intercept HTTP reques...

Follow