MSSQL 2016 Server: All databases marked Recovery Pending state

点点圈 提交于 2019-12-02 08:53:27

Using the manual method to fix recovery pending status in SQL Server Database, which is following-

Set the database status to the emergency:

ALTER DATABASE [dbname] SET EMERGENCY

Put the database in multi-user mode:

ALTER DATABASE [dbname] SET MULTI_USER

Detach the database:

EXEC sp_detach_db '[dbname]'

Reattach the data file only:

EXEC sp_attach_single_file_db @dbname = '[dbname]', @physname = N'[mdf path]'

You can also get a solution from - https://community.spiceworks.com/how_to/157233-how-to-fix-recovery-pending-state-in-sql-server-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!