Readme_Exporting from ODBC to a Flat File Using a Wizard Tutorial: Lesson Packages

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This sample works only with Microsoft SQL Server 2008. This sample will not work with any version of SQL Server earlier than SQL Server 2008.

This sample works with the SQL Server 2005 version of the AdventureWorks OLTP database. To install this database, see Sample Databases for Microsoft SQL Server 2008.

The Export ODBC Lesson package is the completed package from the Integration Services tutorial, Tutorial: Exporting from ODBC to a Flat File Using a Wizard. The topics in Books Online provide detailed information about the functionality of this package. For more information, see the topics in "Exporting from ODBC to a Text File Using a Wizard" located in the Integration Services Tutorials section of Books Online.

Briefly, the Export ODBC Lesson is a data transfer package that exports data from a SQL Server ODBC data source to an existing text file. The package extracts the data from a table in the AdventureWorks database and loads this data into the text file. This package was built by using the SQL Server Import and Export Wizard.

You can open and run this package outside the tutorial. However, we do not recommend that you modify this package. Modification of this tutorial package might give you results that differ from the package results that were defined in the tutorial lessons.

If you run the sample on a non-English version of Windows, you might have to substitute the localized name of the Program Files folder to open or run the sample.

Important

Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples.

Requirements

To run this sample package, the following components are required:

  • The sample package and data files that the package uses must be installed on the local hard disk drive.
  • You must have installed and have administrative permissions on the AdventureWorks OLTP database.
  • If you run the sample package only from the command line, you must install Integration Services.
  • If you open the package in SSIS Designer and run the sample package, you must install Business Intelligence Development Studio.

For more information about how to install samples, see "Considerations for Installing SQL Server Samples and Sample Databases" in SQL Server Books Online.

Location of the Sample Package

If you installed the samples to the default installation location, the tutorial sample package is located in the following folder:

C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Exporting ODBC to Flat File\Completed Packages

To run this sample package, the files listed in the following table must be stored on the computer that is running the package.

File Description

Export ODBC Lesson.dtxs

The sample package.

FlatFile.txt

The text file that contains the data that is exported from a SQL Server ODBC data source.

Running the Sample

The package can be run from the command line by using the dtexec utility (dtexec.exe), or can be run in Business Intelligence Development Studio..

Running the Sample at the Command Prompt

Use the following procedure to use the dtexec utility to run this sample package. For more information about how to use the dtexec utility to run a package, see the topic, "dtexec Utility," in SQL Server Books Online.

To run the package by using dtexec

  1. Open a Command Prompt window.

  2. At the command prompt, change the directory to <drive>:\Program Files\Microsoft SQL Server\100\DTS\Binn.

    This directory contains the dtexec utility.

  3. Type the following command:

    dtexec /f "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Exporting ODBC to Flat File\Completed Packages\Export ODBC Lesson.dtsx"
    
  4. Press ENTER.

Running the Sample in Business Intelligence Development Studio

If you do not already have an Integration Services project to which you can add the tutorial packages, you must first create a project.

To create a new Integration Services project

  1. Open Business Intelligence Development Studio.

  2. On the File menu, point to New, and then click Project.

  3. In the New Project dialog box, select the Integration Services Project template from the Templates pane.

  4. Optionally, modify the project name and the location.

    The solution name is automatically updated to match the project name.

  5. In the Solution drop-down list, select Create new Solution.

  6. To create a separate folder for the solution file, select Create directory for solution.

    This is the default option.

  7. Click OK to add the solution to Solution Explorer and add the project to the solution.

Next, you add the packages to the Integration Services project.

To run the package in Business Intelligence Development Studio

  1. In Solution Explorer, right-click SSIS Packages, and then click Add Existing Package.

  2. In the Add Copy of Existing Package dialog box, set Package location to File system, click browse (…), and locate the folder that contains the completed package from the tutorial.

    The default location is C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Tutorial\Exporting ODBC to Flat File\Completed Packages.

  3. Click the package, and then click Open.

  4. Click OK.

  5. In the SSIS Packages folder, right-click the package to run, and then click Execute Package.