21 May 2014

Running a Package

You can run the final package from either BIDS or SQL Server Management Studio. When you're developing a package, it's convenient to run it directly from BIDS. When the package has been deployed to a production server (and saved to the msdb database or the Package Store) you'll probably want to run it from SQL Server Management Studio.

SQL Server also includes a command-line utility, dtsexec, that lets you run packages from batch files


Running Package from BIDS
  • With the package open in BIDS, you can run it using the standard Visual Studio tools for running a project. Choose any of these options:
  • Right-click the package in Solution Explorer and select Execute Package.
  • Click the Start Debugging toolbar button.
  • Press F5.
To run the package that you have loaded in BIDS, follow these steps:
  • Click the Start Debugging toolbar button. SSIS will execute the package, highlighting the steps in the package as they are completed. You can select any tab to watch what's going on. For example, if you select the Control Flow tab, you'll see tasks highlighted
Executing Package in debugger


  • When the package finishes executing, click the hyperlink underneath the Connection Managers pane to stop the debugger.
  • Click the Execution Results tab to see detailed information on the package 


   Note:All of the events you see in the Execution Results pane are things that you can create event handlers to react to within the package. As you can see, DTS issues a quite a number of events, from progress events to warnings about extra columns of data that we retrieved but never used.

Running a Package from SQL Server Management Studio
To run a package from SQL Server Management Studio, you need to connect Object Browser to SSIS.
In SQL Server Management Studio, click the Connect button at the top of the Object Explorer window.
  • Select Integration Services.
  • Choose the server with Integration Services installed and click Connect. This will add an Integration Services node at the bottom of Object Explorer.
  • Expand the Stored Packages node. You'll see that you can drill down into the File System node to find packages in the Package Store, or the MSDB node to find packages stored in the msdb database.
  • Expand the File System node.
  • Right-click on the Export Departments package and select Run Package. This will open the Execute Package utility

  •  Click Execute.
  • Click Close twice to dismiss the progress dialog box and the Execute Package Utility.
  • Enter this text into a query window with the Chapter16 database selected:
  • SELECT * FROM DepartmentExports
  • Click the Execute toolbar button to verify that the package was run. You should see one entry for when the package was run from BIDS and one from when you ran it from SQL Server Management Studio



No comments:

Post a Comment