Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

SQL Server 2015 Restore - doing it right

I have been using this command for years to make a copy of the production database:

RESTORE DATABASE [DBFCOPY] FROM  
DISK = N'H:\LiveBack.bak' 
WITH REPLACE, FILE = 1,  MOVE N'XXX2012B' 
TO N'H:\DATA\DBFCOPY.mdf', 
 MOVE N'XXX2012B_log' 
 TO N'H:\DATA\DBFCOPY_1.ldf', 
  NOUNLOAD,  STATS = 10

Open in new window


LiveBack.bak is a copy of the production database.
DBFCOPY is the name I'm giving my new database copy.
XX2012B is the Logical Name of the production database and the log file.

My question is, is this the best way to make a copy? And when I do make a copy, ALL of their Logical file names are still XX2012B, not the new name I'm naming them.

How do I change the Logical name of the copies. Should I be concerned that the logical name for all of my copies is also the same name as the parent?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Starr Duskk

ASKER

Thanks Scott! Nice to see you around again! :)