Copying a database on SQL Server 2005 using Backup and Restore
Backup JaneTest and store the resultant file somewhere I can get hold of it from
Then restore that backup to a new database named JaneDallawayTest by executing the following SQL:
RESTORE DATABASE [JaneDallawayTest]
FROM disk = N'JaneTestBackup.bak'
WITH FILE = 1 ,
move N'JaneTest'
TO N'G:\SQLData\JaneDallawayTest.mdf' ,
move N'JaneTest_log' TO N'G:\SQLData\JaneDallawayTest_log.ldf' ,
nounload , stats = 10 , replace
GOAll that is left to do is to update the logical name for the new database in the Database Properties dialog.