Today I found msdb database was in suspected mode, so I restored MSDB from my latest backup(As I have daily backup for this database). When I restore the MSDB database using Tsql i got below errors, but database restore was successful.
Processed 17056 pages for database 'msdb', file 'MSDBData' on file 1. Processed 5 pages for database 'msdb', file 'MSDBLog' on file 1. Msg 2627, Level 14, State 1, Line 2 Violation of PRIMARY KEY constraint 'PK__backupse__21F79AAB0E391C95'. Cannot insert duplicate key in object 'dbo.backupset'. The duplicate key value is (60979). Msg 3009, Level 16, State 1, Line 2 Could not insert a backup or restore history/detail record in the msdb database. This may indicate a problem with the msdb database. The backup/restore operation was still successful. The statement has been terminated. RESTORE DATABASE successfully processed 17061 pages in 6.953 seconds (19.169 MB/sec).
But after restore I found that SQL server instance is running proper and all database are accessible. But to ensure about the error I got during restore I used
CHECKDB command for the MSDB database.It shows below errors.
DBCC results for 'msdb'. Msg 8921, Level 16, State 1, Line 1 Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is inconsistent. Check previous errors. Msg 2515, Level 16, State 1, Line 1 The page (1:1044), object ID 60, index ID 1, partition ID 281474980642816, allocation unit ID 281474980642816 (type In-row data) has been modified, but is not marked as modified in the differential backup bitmap. CHECKDB found 0 allocation errors and 1 consistency errors in table 'sys.sysobjvalues' (object ID 60). CHECKDB found 0 allocation errors and 1 consistency errors in database 'msdb'.
So what are these errors? Also is it due to the error I got during restore? Is there anything I need to do as I got error while restore?