SQL error 926 occurs when a recovery process fails thereby bringing the SQL database to an inconsistent transactional state.
At Ibmi Media, we have regularly helped customers to fix SQL related errors as part of our Server Support Services.
In this context, we will look into the cause of this error and how to get rid of it.
When this error occurs, an error message such as listed below is displayed;
SQL Error 926
Severity Level 14
Message Text
Database '%.*ls' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server error log for more information.(Microsoft SQL Server, Error: 926).
This database issue causes disruption of database functionality in SQL server resulting in difficulties in SQL transactions. This makes that database unavailable to the user.
Notable factors that trigger this error is outlined below;
i. When an SQL database is marked as suspected.
ii. Not following due process in shutting down the SQL server application.
iii. When the header part of the system file is corrupted.
iv. When the hardware of the machine has been affected by a Malware threat.
Different approaches can be taken to solve this SQL error 926. Follow the steps below;
1. Perform a restart of the SQL Server Management Studio (SSMS) as well as the SQL Server (MSSQLSERVER).
2. You can refresh and reconnect the SQL Server instance connection.
3. Restarting the computer is also helpful.
Additionally, if the above measures fails, you can check the SQL Server error log to see what it says. If you have a backup of the database, you can restore it.
In other cases, you can repair the DBCC CHECKDB which will help to solve the errors in the SQL Server. Use the command below;
DBCC CheckDB (‘DB_Name’, REPAIR_ALLOW_DATA_LOSS);
When a recovery process fails it makes the
SQL database to assume an inconsistent transactional state leading to Microsoft SQL server error 926.