SQL Server: Database stuck in “Restoring” state

前端 未结 26 2080
后悔当初
后悔当初 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:37

    I figured out why.

    If the client who issued the RESTORE DATABASE command disconnects during the restore, the restore will be stuck.

    It's odd that the server, when told to restore a database by a client connection, will not finish the restore unless the client stays connected the entire time.

提交回复
热议问题