After being set to "suspicious", I was puzzled that I had not encountered such a situation before. I asked a few seniors who still did not find the problem. Finally, I have solved the problem. Now I want to share my solution with you:
First, the database cannot be taken offline, detached, and other operations. In this case, the database cannot wake up for backup. If you make the database offline, there is no solution. I have also done this silly thing, and I must never repeat it.
Next, run the following code to replace dbName with your own database.
USE MASTER GO SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE GO ALTER DATABASE dbName SET EMERGENCY GO sp_dboption 'dbName', 'single user', 'true' GO DBCC CHECKDB('dbName','REPAIR_ALLOW_DATA_LOSS') GO ALTER DATABASE dbName SET ONLINE GO sp_configure 'allow updates', 0 reconfigure with override GO sp_dboption 'dbName', 'single user', 'false' GO |
Then, although this can restore the database to normal, it can at least perform operations on the database. Including query and update. However, this does not really solve the problem, but only modifies the "suspicious" Status of the database.
The following describes the specific problem. There are many reasons for this problem, either database operations, triggers, stored procedures, indexes, and logs.
If your database is not large and there is not much data in it, you want to re-create the database and then import the data.
If it is too large to be updated in time, I hope you can search the logs of databases, systems, and applications and check the log records. You may find some suspicious signs.
Finally, you can add a new log file. We recommend that you delete a long log file. Check whether the auto-Growth of databases and logs is normal.
- Select the best SQL Server version that meets Database Requirements
- SQL Server executes proxy tasks through code
- SQL Server question database solution