views:

67

answers:

3

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

+1  A: 

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.

Jason Williams
A: 

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.

Philip Kelley
+4  A: 

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

Remus Rusanu