-- 完整还原
RESTORE DATABASE XXXX
FROM DISK = 'd:XXXX.bak'
WITH MOVE 'XXXX' TO 'D:MSSQLDataXXXX.mdf',
MOVE 'XXXX_Log' TO 'D:MSSQLDataXXXX.ldf',
REPLACE,NORECOVERY;
GO
查看备份文件信息
RESTORE FILELISTONLY FROM DISK = N'd:XXXX.bak';
-- 完整还原
RESTORE DATABASE XXXX
FROM DISK = 'd:XXXX.bak'
WITH MOVE 'XXXX' TO 'D:MSSQLDataXXXX.mdf',
MOVE 'XXXX_Log' TO 'D:MSSQLDataXXXX.ldf',
REPLACE,NORECOVERY;
GO
查看备份文件信息
RESTORE FILELISTONLY FROM DISK = N'd:XXXX.bak';