i had a server crash. I restored to a similar server msdb, master and model. No not as system databases but just databases. what tables do i need import into system databases so i can get necessary information? I do hope someone has some brilliant ideas The version difference is 9.00.5000 versus 9.0.5057. The server i am using is the latter version. Otherwise they are replicas and we use the 9.00.5057 as development. Course the live data server crashed.
There are a handful of scripts out that talk about how to do this (none of them are supported methods from Microsoft), you are basically going to query the job tables in your restored copy of msdb and join those together to get the data required. You would treat them like you do any tables with relationships though if you wanted to give it a try. I would likely just query the data out of the restored copy and then build out scripts to re-create the jobs using the supported methods (e.g. using the sp_jobxx procedures). For future I would also consider implementing a scripting process when creating jobs so you have a "backup" of the job definition. You can use PowerShell to do this in an automated fashion. **Edits** Link to BOL that you can find the tables involved in SQL Agent jobs: [SQL Agent Tables]. A script located on Server Fault (use at your own risk) that should work can be found [here]. For pulling out the SSIS package definitions you can use a PowerShell script that Jamie Thomson published on his blog [here]. :