Results 1 to 3 of 3

Thread: restoring msdb

  1. #1
    Join Date
    Mar 2004

    Unanswered: restoring msdb

    I need some data from msdb.dbo.sysjobs and msdb.dbo.sysjobhistory but I need it from a backup file.

    I don't need to restore the msdb database, I just need some data from the backup. Everytime I try to restore it under some innocuous name like bills_db it tells me msdb is in use.

    Is there a way to restore this db to some other name and retrieve data from it?

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    I never really had to do this but I imagine your sql server is getting pissed because you are trying to restore over the current msdb.

    if I was you, I would create a blank database named something other than msdb and look at the WITH REPLACE argument of the RESTORE statement in books online.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2004
    In a large office with bad lighting
    Rather that WITH REPLACE, look at WITH MOVE:

    restore database msdb_copy from disk = '<disk location>' WITH
    MOVE 'MSDBData' to '<different physical file name>.mdb'
    ,MOVE 'MSDBLog' to '<different physical file name>.ldf'

    -- This is all just a Figment of my Imagination --

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts