Here's a version of a production script (the names have been changed to
protect the innocent) which restore a full database backup which is from
a different location:
RESTORE DATABASE MODEL
-- database name
FROM DISK = 'E:\MSSQL\backup\model_Log.bak'
-- 'backup filename with location
WITH STANDBY = 'E:\MSSQL\data\model_undo.dat',
-- undo file name
Replace, -- this forces the backup over an
existing database
MOVE 'modellog' TO 'E:\MSSQL\Data\modellog.LDF',
-- system name of the log
MOVE 'model' TO 'E:\MSSQL\Data\model.MDF',
-- system name of the database
Good luck!
-----Original Message-----
From: Zelli Brian
[mailto:mssqldba-ezmlmshield-x15280825.[Email address protected]
Sent: Thursday, March 29, 2007 3:45 PM
To: LazyDBA Discussion
Subject: Restore options
Hello all,
I have backups of the db and logs using scripts in jobs. If I want to
restore and haven't specified a backup_device, what is the syntax?
RESTORE DATABASE PROD ........?
ciao,
Brian
This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee
or agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited. If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
MS Sql Server LazyDBA home page