First, the main database appears suspicious repair method:
The first method:
When this operation failure occurs in the database, you can do this by following the steps below, open the SQL Query Editor window in the database and run the following command:
Modify the database to emergency mode
ALTER Database name SET EMERGENCY
? Make the database single-user mode
ALTER Database name SET single_user
? fix database log rebuild, this command checks the allocation, structure, logical integrity, and the objects in all databases are incorrect. When you specify "Repair_allow_data_loss" as the DBCC CHECKDB command parameter, the program checks and corrects the report incorrectly. However, these fixes may result in some data loss.
DBCC CheckDB (database name, Repair_allow_data_loss)
Change the database back to multi-user mode
ALTER Database name SET multi_user
A database that is marked as "suspect" is restored to a healthy state when you restart SQL Server
The second method:
If you have a database full backup, build a database with the same name as the suspect database on other SQL Server machines, restore the full backup to the pre-built database, and then copy the LDF and MDF files from the new database to the directory that can be database.
Second, the msdb system database is suspicious
To install SQL Server 2005 from a different machine stop the SQL Servers service
Copy the Msdbdata.mdf and msdblog.ldf from the C:\Program Files\Microsoft SQL Server\MSSQL\Data to your computer and overwrite it, and start the SQL Server service from the new one. This solves the problem. (Recommended to put your original msdbdata.mdf and msdblog.ldf back under)
If the copy comes from a single user, then right-click the library's properties-options-restrict access to multi_user on it, there is no problem, it is recommended to try after backup
How to fix a suspicious error in SQL Server database