Quantcast
Channel: SQL Backup Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 110

SQL SERVER – Alternative of Log Shipping in Simple Recovery Model

$
0
0

The blog topic might seem controversial and doesn’t go well with definition of log shipping features. Read it again. The blog has an alternative way to set up something “similar” to log-shipping. If the database is in simple recovery model, then we can’t take transaction log backups and hence no log shipping possible.

SQL SERVER - Alternative of Log Shipping in Simple Recovery Model logshipping

In the script, I am taking last full backup and the last differential backup and restoring them on the destination server. To do this, we need to have a linked server created on the secondary server, which would point to the primary server. Here are the things to be replaced with the script.

  1. Shared Path on primary (@BackupPath) – This is the share location which has backup and can be accessed by SQL Server on secondary for restoring purpose.
  2. Local path on secondary (@RestorePath) – This is the folder on secondary where the backups would be restored and MDF/LDF would be kept there.
  3. Database Name (@database_name) – This is the database name for which we want to configure regular backups and restores.
  4. Linked server name – This is the linked server created on secondary server. In below script, it’s called as PrimaryLinkedServer.

You can download the entire script from this link

Please comment if you find it useful.

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – Alternative of Log Shipping in Simple Recovery Model


Viewing all articles
Browse latest Browse all 110

Trending Articles