I did something dumb with MSDB

  • I didn't backup my MSDB on one of my servers mostly because it was still being configured so I hadn't gotten around to scheduling the SystemDBs backup. now today I see that after a reboot we have not been able to get this server back on it's feet. it's been a few days now. since there really isn't much stuff in the existing msdb, is it possible to just copy an existing msdb from another similar server? probably would hurt it more than help I gather.

    --

    Signed: Up the creek

    -- Francisco

  • Hi Franc,

               After reboot what is the exact error ? ? ?  .....you cant open management studio or cant even access the dbs ? ? ? .....s you can copy the backup file of some other servers msdb and restore it here.....you need to know that all the jobs present in the servers msdb which you restore here will be present here also.Its always advisable that you rebuild your msdb alone....

    just use the below command,all ur sys  dbs will be rebuild

    start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=<NewStrongPassword>

    refer the link,

    http://msdn2.microsoft.com/en-us/library/ms144259.aspx

    [font="Verdana"]- Deepak[/font]

  • Franc,

    Since msdb database is corrupt (we would like to know error message to confirm this) follow below steps.

    1. Backup all databases (except msdb)

    2. rebuild system databases as indicated by deepak

    3. Restore databases (except msdb)

    In case of questions, reply back.

    HTH

    Balmukund

     

  • You have only your msdb corrupt then no need to rebuild instead check there will be scripts in the default folder for msdb, model and tempdb just execute the script for msdb it should work fine.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • The script name is instmsdb will be available in

    <<DRIVE>>\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Install

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • wow.. thanks for all your help, the instmdb worked!

    -- Francisco

  • This is ofcourse undocumented but for sure will rebuild the msdb database without having to rebuild your sql server system.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply