SQL Server: Database stuck in “Restoring” state

前端 未结 26 2084
后悔当初
后悔当初 2020-11-28 17:09

I backed up a database:

BACKUP DATABASE MyDatabase
TO DISK = \'MyDatabase.bak\'
WITH INIT --overwrite existing

And then tried to restore it

26条回答
  •  庸人自扰
    2020-11-28 17:52

    In my case, it was sufficient to drop the database which was hanging in state "Restoring..." with the SQL command

     drop database  
    

    in a query window.

    Then I right-clicked on Databases and selected Refresh which removed the entry in Management Studio. Afterwards I did a new restore which worked fine (note that bringing it offline did not work, a restart of the SQL service did not work, a server reboot did not work as well).

提交回复
热议问题