Full Restore with TSQL & Name Change of Database
Posted on 2006-05-16
I'm currently taking an SQL Server 2000 course. I had to do a full back of the Northwind database using TSQL in Query Analyzer. I did that. Now I have to delete the database and restore and change the name of the database it using my backup copy.
I've deleted the database and have been able to complete restore it. However, I cannot figure out how to change the name. I've looked through this site for help and just got more confused. Here is the full restore code I have that works. Just need help or guided in the right direction on how to change the name.
--Restore Northwind from "RhondaColeman_WindBackup_TSQL"
--Recover the database and change the name to "nWindRestored"
RESTORE DATABASE Northwind
WITH FILE = 1,