The Transfer Jobs task can be configured to transfer all jobs, or only specified jobs. You can also indicate whether the transferred jobs are enabled at the destination.
The jobs to be transferred may already exist on the destination. The Transfer Jobs task can be configured to handle existing jobs in the following ways:
- Overwrite existing jobs.
- Fail the task when duplicate jobs exist.
- Skip duplicate jobs.
1. Select and Drag, Transfer Jobs Task, from Container Flow Items to designer surface.
2. To configure a task, Right click on Transfer Jobs Task, which we dragged to Design surface. Click on "Edit.", you will get page as:
3. SSIS Transfer Jobs Task - General : Here we need to assign unique name to this task and also we can specify brief description, so we will get idea why we need to design this task.
4. SSIS Transfer Jobs Task - Jobs : Jobs page of the Transfer Jobs Task Editor dialog box is required to specify properties for copying one or more SQL Server Agent jobs from one instance of SQL Server to another.
Let's take a view how each properties are used.
SourceConnection: Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the source server
DestinationConnection: Select a SMO connection manager in the list, or click <New connection...> to create a new connection to the destination server.
JobsList: Click the browse button (.) to select the jobs to copy. At least one job must be selected.
FailTask: If job of the same name already exists on the Destination Server then task will fail.
Overwrite: If job of the same name already exists on the Destination Server then task will overwrite the job.
Skip: If job of the same name already exists on the Destination Server then task will skip that job.
TRUE: Enable jobs on destination server.
FALSE: Disable jobs on destination server.
5. SSIS Transfer Jobs Task - Expressions: Click the ellipsis to open the Property Expressions Editor dialog box.
Property expressions update the values of properties when the package is run. The expressions are evaluated and their results are used instead of the values to which you set the properties when you configured the package and package objects. The expressions can include variables and the functions and operators that the expression language provides.
Now let's run task, by right click on task and click on Execute Task, as shown in following figure. You can either Execute Package by right click on Package name, from Solution Explorer.
Once you run this then all/selected jobs will be transferred to destination server as per given criteria.
No comments:
Post a Comment