SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Compare MS SQL Agent jobs on two servers

By Evgeny Garaev,

During a database migration or a side by side database upgrade project we need to migrate the MS SQL Server Agent jobs. This script compare jobs by names and shows unmatched jobs from both boxes. That would help to avoid problems related to the forgotten to migrate MS SQL Agent jobs.

In order to use this script you need to:

  1. create a linked server to the other server
  2. replace {OLD_BOX} with your linked server name
  3. execute the script.

The account which you use to execute this script must have select permissions on the table msdb.[dbo].[sysjobs] on both servers.

Total article views: 286 | Views in the last 30 days: 7
Related Articles

Taking Script of Sql Server Jobs for Migration

when migration sql server database to a new server, i use the following powershell script to take al...





Script Server Roles

Script Server Roles in case of migration or documentation


SQL Server Migration

Some SQL migrations require keeping the server name, instance name, IP, and port number. Geoff Ruble...



during migration