Click here to Skip to main content
14,325,916 members
Rate this:
Please Sign up or sign in to vote.
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.
Rate this:
Please Sign up or sign in to vote.

Solution 2

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

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`
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

Refer this
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100