Hi,

I am trying to install a database from a backup file of a now deleted database.

What happened was that the data file was at D:\SQLData\DatabasesMyDatabase_data.mdf, instead of D:\SQLData\Databases\MyDatabase_data.mdf so we wanted to move it.

The main DBA here showed me a ‘quick’ way to fix this was by taking a backup of the database, deleting it, recreating it, and then overwriting it with the backup. So I did that but when I try to overwrite the recreated database, I get the following error:

“The backup set holds a backup of a database other than the existing 'MyDatabase' database.”

If I try to create a database using a backup, I get the following error:

"Could not find database ID 65535. Database may not be activated yet or may be in transition"

I do all this in Enterprise Manager by the way, not by running scripts.

Has anyone any ideas of what I could do? This backup holds critical information!!!

Thanks

In the Restore Database window, on the Options screen, check the first option 'Overwrite the existing database'.

BTW, are you restoring from a .bak file? Or the .mdf? If you are restoring from the .mdf, you have to attach the database rather than restore it. Let me know if you need more info.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.