Importing/Exporting Data  «Prev  Next»

Lesson 8Scheduling and running a package
Objective Create, schedule, and run a package.

Scheduling, Running Package in SQL Server

SQL-Server Capabilities

SQL Server provides you the capability of scheduling when a package is going to run. To schedule a package:

You can select a local or repository package to schedule from SQL-EM
You can select a local or repository package to schedule from SQL-EM.


You can select a local or repository package to schedule from SQL-EM.
You can select a local or repository package to schedule from SQL-EM.

  1. Select the package from SQL-EM.
  2. Select Schedule Package from the menu. This will bring up the Edit Recurring Job Schedule screen. Click the View Image button to see what it looks like.
  3. From this screen, define when you want a package to run. Click the View Image button to see what this screen looks like.
Running a package is relatively simple. Click the View Slide Show Link below.

The following procedure provides steps to automate the execution of a package by using a SQL Server Agent job step to run the package.

To automate package execution by using SQL Server Agent

  1. In SQL Server Management Studio, connect to the instance of SQL Server on which you want to create a job, or the instance that contains the job to which you want to add a step.
  2. Expand the SQL Server Agent node in Object Explorer and perform one of the following tasks:
    1. To create a new job, right-click Jobs and then click New Job.
    2. To add a step to an existing job, expand Jobs, right-click the job, and then click Properties.
  3. On the General page, if you are creating a new job, provide a job name, select an owner and job category, and, optionally, provide a job description.
  4. To make the job available for scheduling, select Enabled.
  5. To create a job step for the package you want to schedule, click Steps, and then click New.
  6. Select Integration Services Package for the job step type.
  7. In the Run as list, select SQL Server Agent Service Account or select a proxy account that has the credentials that the job step will use. For information about creating a proxy account, see Create a SQL Server Agent Proxy.
Using a proxy account instead of the SQL Server Agent Service Account may resolve common issues that can occur when executing a package using the SQL Server Agent.

Running a package in SQL-Server


This is an example of a completed package.
1) This is an example of a completed package.

To execute a package, select Execute from the Package Menu.
2) To execute a package, select Execute from the Package Menu.

The executing package screen shows the status of each step in the package as it executes
3) The executing package screen shows the status of each step in the package as it executes.

The screen shows you which steps are completed successfully. If the step is not completed successfully, the screen will show an error message.
4) The screen shows you which steps are completed successfully. If the step is not completed successfully, the screen will show an error message.

If there are errors, you can double-click on the step in error to see a more detailed message.
5) If there are errors, you can double-click on the step in error to see a more detailed message.

The actual error message on the screen will vary depending on what went wrong with the package.
6) The actual error message on the screen will vary depending on what went wrong with the package.


The next lesson will introduce you to the important features of the DTS Wizard.