


Your image gives a clue as the server reports construction, which you can look for and see is MSSQL Server 2008.Ĭopy ALL the database files (data and log both) from the corrupt database to a safe location The version of the Sql Server Management Studio is not the same as the version of the MS SQL Server database engine you have. You can do this by stopping the server, browsing the directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Bin (or similar) and running: start sqlservr.exe -c -T3608Move or rename corrupted files of msdb (msdbdata.mdf and msdblog.ldf in the directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data or similar)Run the script instmsdb.sql in the directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\InstallStop the server and restart it normal (from the service, for example, without trace flags)PD. It cannot be done as with other BDs because it is a system bd it is possible if the server is started with the trace flag 3608. For that mistake, you have two options:Restore msdb from a backup you haveto create it againFor the second option, in MSSQL Server 2008 and later you can recreate the bd from templates that are in the subdirectory Binn\Templateswhich is just copying and pasting them where the corrupted files are, replacing them (having stopped the MSSQL service previously, of course).If they are not, that task takes longer, because it is necessary:Unlink the damaged msdb.
