SQL Server Integration Services (SSIS) is a Business Intelligence tool which can be used by database developers or administrators to perform Extract, Transform & Load (ETL) operations. In my previous article entitled Using Transfer Error Messages and Transfer Master Stored Procedures Tasks in SSIS I discussed how to use the Transfer Error Messages Task and Transfer Master Stored Procedure Tasks which are available in SQL Server 2005 Integration Services and later versions. In this article I will examine the use of the Transfer Jobs Task which is available in SQL Server 2005 and later versions.
Overview of SQL Server Tasks in SSIS 2005 & Later Versions
The SQL Server Tasks within SSIS can be used to copy, modify and delete SQL Server objects and data. The different types of SQL Server Tasks available in SSIS are Execute SQL Task, Bulk Insert Task, Transfer Database Task, Transfer Login Task, Transfer SQL Server Objects Task, Transfer Error Message Task, Transfer Master Stored Procedure Task and Transfer Jobs Task. If you are new to SQL Server Integration Services then I would recommend you to start with my previous article entitled SQL Server 2008 Integration Services Tasks to understand different types of Integration Services Tasks which are available in SQL Server 2005 and later versions. However, in this article you will see an example for how to configure and use Transfer Jobs Task.
Overview of the Transfer Jobs Task
Database Administrators can use the Transfer Jobs Task to transfer one or more SQL Server Agent Jobs between different SQL Server instances. The Transfer Jobs Task can be configured to transfer not only a single job but also all the SQL Server Agent Jobs from one instance of SQL Server to another instance. There is one more very important option available - to specify whether the transferred SQL Server Agent Jobs should be enabled at the destination or not. The Transfer Job Task can be configured to handle the below scenarios:
a) Overwrite an existing SQL Server Agent Job if there are existing jobs at the destination.
b) If a duplicate SQL Server Agent Job exists in the destination server, then fail the Transfer Jobs Task.
c) Skip the Transfer Jobs Task where there is a duplicate job existing in the destination server.
Create a SQL Server Agent Job to Backup Products Database
You can create a new SQL Server Agent Job namely “Products Database Backup” to backup the Products database by expanding the SQL Server Agent Node and then right clicking the Jobs node to select the New Jobs… option from the drop down menu as shown in the snippet below.