I am trying to restore a database over the existing one. This worked fine in the past, until all of a sudden, it doesnt.
I have clearly, in the past, attached the same database file under a different name and it now thinks that restoring a database over the current instance will overwrite the other instance as well hence giving me the following error:
Failed to restore database: The file 'E:\database\db.mdf' cannot be overwritten. It is being used by database 'ABC'.
File 'db' cannot be restored to 'E:\database\db.mdf'. Use WITH MOVE to identify a valid location for the file.
The file 'E:\database\db_log.ldf' cannot be overwritten. It is being used by database 'ABC'.
File 'db_log' cannot be restored to 'E:\database\db_log.ldf'. Use WITH MOVE to identify a valid location for the file.
The big question: How do you delete references to the old database? How do you find what previous database instances were used even?
Thanks