开发者

How to restore the backup with different name

How can i restore the below Amrutha backup with different name through below script. Could any one please help me doing this.

RESTORE database Amru开发者_如何学JAVAtha
    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;


Just specify the new name - as database name and as file names:

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜