Cannot open database "MainDB_sdx" requested by the login. (SOHODOX SQL DB shows recovery Pending)

Cannot open database "MainDB_sdx" requested by the login. (SOHODOX SQL DB shows recovery Pending)

The Recovery Pending state confirms that SQL Server was unable to complete crash recovery after restart/updates,


Step 1 — Attempt to Bring the Database Online (Non-destructive)

Open a new query window in SSMS and run:

ALTER DATABASE MainDB_sdx SET ONLINE;

If SQL is able to complete crash recovery, this will fix the issue immediately. If not, SQL will return a more specific message — please send us the result.


Step 2 — If Step 1 Fails, Place DB into Emergency Mode

This is safe and read-only. It allows us to access data and perform repair steps:

ALTER DATABASE MainDB_sdx SET EMERGENCY;

You should now be able to browse the tables and, if needed, extract data.


Step 3 — Run a Consistency Check

DBCC CHECKDB(MainDB_sdx);

This will report what SQL sees as the issue.


Step 4 — Attempt Automatic Repair

DBCC CHECKDB(MainDB_sdx, REPAIR_ALLOW_DATA_LOSS);

Despite the name, this typically only discards uncommitted transactions from before the restart and does not result in loss of stored documents/metadata.


Step 5 — Bring Database Back to Normal Mode

ALTER DATABASE MainDB_sdx SET MULTI_USER;

Once complete, restart the SOHODOX client and confirm connectivity.


If You Do Have a Backup

If you have an existing backup, please let us know. Depending on the outcome of Steps 1–4, restoring from backup may actually be the cleaner recovery path in some cases.


Why Recovery Pending Happens

This can occur even if no one intentionally changed configuration settings. It is commonly seen after:

  • Windows or SQL Server updates

  • Forced reboots during holidays/breaks

  • Backup software/VSS snapshot interactions

  • SQL crash-recovery interruptions


Next Request From Our Side

Please send us one of the following after Step 1:

  • The result from ALTER DATABASE SET ONLINE (success or error)

  • The DBCC CHECKDB output (if Step 2+3 were needed)

Most cases resolve fully with the steps above.