目录

sqlserver数据库一直显示正在还原

目录

sqlserver数据库一直显示正在还原

https://i-blog.csdnimg.cn/blog_migrate/e88239fc4e76ee5917750378c5f21227.webp?x-image-process=image/format,png https://i-blog.csdnimg.cn/blog_migrate/b5b3109f53e0fd86d18529c6ab8e1e9f.webp?x-image-process=image/format,png

restore database aaa with recovery

执行语句:

Restore database [dbname] with recovery

https://i-blog.csdnimg.cn/blog_migrate/fbb66c5dc18147c605676e8f5e32833e.webp?x-image-process=image/format,png

2、

解决办法:

执行查询

Restore Database XXX with Recovery

其中XXX是数据库名

执行完语句后刷新下就好了


出现无法还原异常,试试

先执行

Restore Database XXX with Recovery
Restore Database XXX with NoRecovery

再还原一下数据库备份

3、

因数据库还原后,会呈现 正在还原… 的状态,那么需要手动去更改数据库状态,不然不能使用。以下使用命令解除状态

RESTORE DATABASE ceshi WITH RECOVERY            #ceshi 是测试数据库的名称,具体名称按实际情况

https://i-blog.csdnimg.cn/blog_migrate/5f1a0380745f0e902130494fc5e00705.webp?x-image-process=image/format,png

执行成功,刷新以下数据库列表或者断开重连即可

https://i-blog.csdnimg.cn/blog_migrate/7320e1c86e0c753137ed3e3ded240975.webp?x-image-process=image/format,png