June 14, 2007 at 8:24 am
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.
June 14, 2007 at 8:39 am
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
June 15, 2007 at 2:02 am
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
Alexandr Volok
volok.blogspot.com
MCITP: Database Administrator
SQL Server Russian Group www.sql.ru
June 18, 2007 at 2:15 am
Haven't you try anything with DTS packages?
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
June 18, 2007 at 7:14 am
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