Schedule backup, copy & restore jobs in a proper way!!!

  • Hi,

    I have configured log shipping in sql server 2005.

    LSBackup job -----runs every 1hr on Primary

    Copy job & restore job aslo runs very 1 hr on Secondary. For example let's assume the backup starts at 1PM and completes at 1:30PM now the copy task will pick this file at 2PM because it runs every 1 hr then the copy task took 5 minutes so the Restore job will pick this backup at 3PM and apply it. But I want thes jobs to run in the following order.

    After LSBackup job complete, it should trigger the copy job and when copy job completes, it should trigger the restore job. How can we acheive this?

    thanks

  • Edit: **Sorry misread the part where you said you had setup log shipping! **

    A simple solution would just be to add 2nd step to your backup job on the local server, that calls an SSIS package (or DTS is 2000).

    In your package use the 'execute process task' to perform the file copy. (We use a batch file on the server with the file copy commands in).

    Once this task completes successfully add an 'Execute SQL Task' with a connection to the 2nd server, and run the restore.

    Make sure you add logging to the package.

    Oraculum

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply