Click here to Skip to main content
15,923,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I currently have a backup of a database Live which i took last week that i would like to restore over the Dev. they both on the same server and wen i run the restore i get an error

The backup set holds a backup of a database other than the existing 'Dev' database

I am using Sql Server management studio 2012
Posted
Comments
Amir Mahfoozi 7-Nov-13 8:19am    
Remeber to turn on the "Overwrite the existing database (WITH REPLACE)" option in "Options" tab.

Refer this
 
Share this answer
 
I have faced a similar situation. But my scenario was when trying to restore a file group backup of one database on to another. Anyways, it is better to use T-SQL script instead of SSMS.

Try the following code

SQL
RESTORE FILELISTONLY FROM DISK = 'SourceDB_FullBackup_File.bak'

RESTORE DATABASE DestinationDBName
FROM DISK = 'SourceDB_FullBackup_File.bak'
WITH
MOVE 'SourceDBLogicalName' TO 'DestinationDB.mdf' 
,MOVE 'SourceDB_log' TO 'DestinationDB_logfile.ldf' 
,REPLACE
,NORECOVERY


NORECOVERY to be used only when you have more backups to be restored on that database. Otherwise you can simply use `RECOVERY`
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900