1 2 3 4 5 6 7
| USE [master] RESTORE DATABASE [新库] FROM DISK = N'D:\DBback\旧库备份.bak' WITH FILE = 1, MOVE N'旧库' TO N'D:\软件\程序\Microsoft SQL Server\实例\MSSQL12.MSSQLSERVER\MSSQL\DATA\新库.mdf', MOVE N'旧库_log' TO N'D:\软件\程序\Microsoft SQL Server\实例\MSSQL12.MSSQLSERVER\MSSQL\DATA\新库_log.ldf', NOUNLOAD, REPLACE, STATS = 5
GO
|
注:
[SFM_CK(测试版)]:新数据库名
SFM_ECDS:备份文件中的mdf文件名
SFM_ECDS_log:备份文件中的ldf文件名