Back up the database with COPY_ONLY to reduce interference to the production environment.
USE MASTER ;
BACKUP DATABASE VCDB TO DISK = 'C:\VCDB\MyDatabase1.bak' WITH COPY_ONLY ;
--Do not have to create new db first. Can be restore with new db name. The new db name will be created automagically.
USE MASTER ;
RESTORE DATABASE VCDB4 FROM DISK = 'C:\VCDB\MyDatabase1.bak' WITH MOVE 'VCDB' TO 'C:\VCDB\VCDB_3.mdf', MOVE 'VCDB_log' TO 'C:\VCDB\VCDB_3_log.ldf' ,REPLACE, RECOVERY
Left click and right click on Task - Restore database will do too
Select - Restore Files and Filegroups
No comments:
Post a Comment