How to restore a backup with a different name

How to restore Amrutha lower backup using a different name below the script. Can anyone help me on this.

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;
+1
source share
1 answer

Just provide a new name - both the database name and the 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;
+4
source

All Articles