Restoring from a remote server

  • I want to create a job that will restore a database from the latest backup (directory contains one weeks worth of backups) on the production server to a test server. The job would only be run manually as necessary. Does anyone know of a script that will do this? Is there a better approach?

    Thanks.

  • If your database is not too big and if you can afford it.Create another job that backs up directly to the test server overwriting everyday(with init) this will leave you with a current backup of your database everyday on your test server

    Mike

  • 1) Ensure, that sql server agent on test server have enough security permission to access a file on primary server.

    2) Create job with step, which contains this batch:

    Restore database db_name from disk='\\primary_server\path_to_bakup' with replace


    Kindest Regards,

    Alexandr Volok
    volok.blogspot.com

    MCITP: Database Administrator
    SQL Server Russian Group www.sql.ru

  • Haven't you try anything with DTS packages?

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • I ended up creating a SSIS package that did an addtional backed to the target server since I did know how to automate selecting the latest backup from a directory (source server) with multiple backups.

Viewing 5 posts - 1 through 4 (of 4 total)

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