RE: Sproc for Restore

RE: Sproc for Restore

 

  

Thanks. I thought about that, but will it work if the sproc resides in a
database on a different machine than the machine where I want to restore
MyDB?

Gerald Hopkins


-----Original Message-----
From: Mordechai Danielov
[mailto:mssqldba-ezmlmshield-x63804676.[Email address protected]
Sent: Wednesday, March 29, 2006 10:22 AM
To: LazyDBA Discussion
Subject: RE: Sproc for Restore

USE MASTER
GO

RESTORE DATABASE MyDB

FROM DISK = 'D:\MSSQL\BACKUP\MyDB.bak'

WITH RECOVERY,REPLACE,

MOVE MyDB TO 'D:\mssql\data\MyDB.mdf',

MOVE 'MyDB_log' TO 'D:\mssql\log\MyDB_log.ldf'



Go





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page