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 :)
Perhap simplest would be to do the following:
- Install a new instance of SQL Server.
- Shut down the SQL Server, delete the msdb data and log files.
- Copy the old msdb data and log files to the same location as the files you deleted.
- 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.)
- 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/