1

I have backed up a database into a file using SQL Server from my old server.

Now i would like to restore that file into a new database on my new server.

I created a DB with the same name , I am getting an error saying :

"The Backup set holds a backup of the database other than the existing '*****' database"

Any thoughts?

Thanks

4 Answers 4

4

Add a WITH REPLACE option to your restore:

Specifies that SQL Server should create the specified database and its related files even if another database already exists with the same name

Sign up to request clarification or add additional context in comments.

Comments

1

Drop the new database - it's sitting in the way of the one you want to restore.

THen when you try to restore your old database, select the file to restore from, and the name will magically appear in the "to database" destination field in SSMS.

Comments

0

When you restore a database from backup, you are creating a new database on the SQL instance. If a database by that name is already present on that SQL instance, you will get an error--unless you select the option to overwrite any existing database, in which case the old database will be wiped out and replaced.

Comments

0

I was having the same issue, but even when putting WITH REPLACE, the error occurred. I had an empty database with the same name as the back up, but the problem was my .trn file I was using to backup from had two backup sets and I was choosing to restore from the full database AND the transaction log. I chose only the Full Database and it worked.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.