Long Story Short... my Database server died a month ago. I restored everything but the MSDB as the tape backup failed. I reconstructed some jobs but some essential ones are missing. I finally found the MSDB backup in an old partition, but here's the gist... it isn't a .BAK file but the actual database and log. I already created a new Database in my instance and attached the MSDB (with different name obviously, MSDBJobs) but I have no idea whatsoever on how can I extract the jobs from this database. I don't want to replace the current ones as some are new and essential as well. Thanks for any help provided :)

| improve this question | | | | |

Perhap simplest would be to do the following:

  1. Install a new instance of SQL Server.
  2. Shut down the SQL Server, delete the msdb data and log files.
  3. Copy the old msdb data and log files to the same location as the files you deleted.
  4. Bring up the new instance of SQL Server and script out the jobs. (You can use SSMS Object Explorer Details to select all jobs and create one massive script, or do them one at a time.)
  5. Uninstall the new instance.

There are also scripts, including this powershell script, but they use methods that talk to msdb: http://www.johnsansom.com/script-sql-server-agent-jobs-using-powershell/

| improve this answer | | | | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.