This problem happened to me after I killed the connections PID to one of my databases. The single user mode was removed, but I wasn’t able to use the database, since it was in the Recovery Pending mode. How to fix this problem?

This status means SQL couldn’t open the database files for some reason. It also means it couldn’t lock the files as well.

To force the database to be online again, just run the following command:

ALTER DATABASE MyDB SET ONLINE

You can use the above statement to try and activate databases that are “offline” or are in “Recovery Pending” mode.

Further info here.

Advertisements