如何通过以下脚本恢复具有不同名称的以下Amrutha备份。 任何人都可以帮我这样做。
RESTORE database Amrutha
FROM DISK = 'D:\Amrutha.bak'
WITH
MOVE 'Amrutha' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Amrutha.mdf',
MOVE 'Amrutha_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Amrutha_log.LDF',
CHECKSUM;
答案 0 :(得分:4)
只需指定新名称 - 作为数据库名称和文件名:
RESTORE database Amrutha_NEW
FROM DISK = 'D:\Amrutha.bak'
WITH
MOVE 'Amrutha' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AmruthaNEW.mdf',
MOVE 'Amrutha_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\AmruthaNEW_log.LDF',
CHECKSUM;