My SQL Server Express database's msdb
file has become 'suspect'. All the other mdf files seem to be OK.
I now need to recreate the msdb
file, but I do not have a backup for it (guilty as charged!). I have backups for my other DBs. This is what I found from this blog:
If your msdb goes suspect then you have two choices, if you have
backup of database then restore it else you have to recreate itIf you want to recreate it here are the steps to do it
- Start the server with trace flag 3608. Detach the damaged
msdb
- Navigate to the directory
C:\Program Files\Microsoft SQL
and start
Server\MSSQL.1\MSSQL\Binnsqlservr.exe -c -T3608
- Move or rename the damaged
msdb
files- Go to the folder
C:\Program Files\Microsoft SQL
and run the
Server\MSSQL.1\MSSQL\Installinstmsdb
file.- Restart SQL Server without the 3608 trace flag
Has someone done this before? I would like to get opinions or better suggestions before I break things more.
Thanks!
EDIT:
My advice to anyone is to treat SQL Express like any production DB. Have rigorous back-up policy and make sure you back-up your system databases.
Best Answer
You either recreate as above or restore it.
The info above is similar to MSDN, see "Creating a New msdb Database".
Note: if this came from Paul Randal's blog or the SQL Server Storage Engine then you can trust it