BACKUP DATABASE [DB_Name]
TO DISK = N'\\server\directory\backupfile.bak'
WITH NOFORMAT, INIT, NAME=N'DBNAME', SKIP, NOREWIND, NOUNLOAD, STATS=10;
RESTORE FILELISTONLY
FROM DISK= N'\\server\directory\backupfile.bak'
DROP DATABASE [DB_Name] ;
RESTORE DATABASE [DB_Name]
FROM DISK=''\\server\directory\backupfile.bak'
WITH
MOVE 'DB_logicalName' TO
'D:\Databases\data file name.mdf',
MOVE 'DB_Log Name_log' TO
'E:\Logs\log file name_log.ldf'
Comments
Post a Comment