When using the GUI, you have to specify "" to enable over writing of a database with a backup from another database. See "Using the REPLACE option" on MSDN
How to?
With raw SQL, you need WITH REPLACE
:
Specifies that SQL Server should create the specified database and its related files even if another database already exists with the same name. In such a case, the existing database is deleted. When the REPLACE option is not specified, a safety check occurs. This prevents overwriting a different database by accident. The safety check ensures that the RESTORE DATABASE statement does not restore the database to the current server if the following conditions both exist:
- The database named in the RESTORE statement already exists on the current server, and
- The database name is different from the database name recorded in the backup set.
When using the GUI, you need to set "Overwrite the existing database":
Specifies that the restore operation will overwrite the files of any database that is currently using the database name that you are specifying in the To database field on the General page of the Restore Database dialog box. The files of the existing database will be overwritten even if you are restoring backups from a different database to the existing database name. Selecting this option is equivalent to using the REPLACE option in a RESTORE statement