question

thennarasu avatar image
thennarasu asked

restored msdb can create jobs in sql agent

i have server 'A' with lot of jobs ,want to restore this to another server i have decided to restore 'msdb' database can this automatically create jobs in sql agent (job activity monitor) else we have to create manually?
sql-server-2008sql-server-2012
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
ThomasRushton avatar image
ThomasRushton answered
That would create the jobs; however, it would also lose you anything else you had in the msdb database (primarily things like backup / restore history, alerts, operators, and any other jobs you had set up). You might be better looking at just scripting out the jobs or using something like dbatools's [Copy-DbaAgentJob][1] powershell script (free) [1]: https://dbatools.io/functions/copy-dbaagentjob/
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DenisT avatar image DenisT commented ·
Also worth mentioning that the general recommendation that the version of both instances should match. So if you have a backup from SQL Server 2014 SP2 - CU4, the target instance should be at the same patch level to avoid any unforeseen issues. Otherwise, +1
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.