March 25, 2010 at 11:27 am
Hi all,
I have a database called DB and I need to restore it on the same Box with different name. Can anybody tell me if this instruction is the correct one? (actual database name DB, new name DB_V2)
RESTORE DATABASE [DB_V2]
FROM DISK = N'D:\FullBackup.bak'
WITH FILE = 1,
MOVE N'DB' TO N'D:\MSSQL\Data\DB_v2.mdf',
MOVE N'DB_log' TO N'D:\MSSQL\Data\DB_v2_log.ldf',
RECOVERY, NOUNLOAD, REPLACE, STATS = 10
thank you
March 25, 2010 at 11:29 am
I forgot to mention that my database has the Full Recovery Model, but I dont need the up to date data. Im planing to use the last full backup of this database.
March 25, 2010 at 11:31 am
MTY-1082557 (3/25/2010)
Hi all,I have a database called DB and I need to restore it on the same Box with different name. Can anybody tell me if this instruction is the correct one? (actual database name DB, new name DB_V2)
RESTORE DATABASE [DB_V2]
FROM DISK = N'D:\FullBackup.bak'
WITH FILE = 1,
MOVE N'DB' TO N'D:\MSSQL\Data\DB_v2.mdf',
MOVE N'DB_log' TO N'D:\MSSQL\Data\DB_v2_log.ldf',
RECOVERY, NOUNLOAD, REPLACE, STATS = 10
thank you
Looks correct to me.
The Redneck DBA
March 25, 2010 at 12:39 pm
I think it looks OK. Test it on a different machine first to verify you get what you need.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 25, 2010 at 12:42 pm
Thank you everyone.
It works perfectly 🙂
March 25, 2010 at 12:43 pm
I like to check the logical name as well to make sure I have the MOVE statements correct:
RESTORE FILELISTONLY FROM DISK = 'D:\FullBackup.bak'
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply