Export Data to Text File

  • I have a stored procedure that extracts data from a remote database, the database name and catalog is specified at run-time and is stored in variables.

    What I want to do is create an SSIS package that does the following:

    1. Store the values for database name and catalog so that it can execute the stored procedure

    2. Output the results of the stored procedure to a text file

    I have done this already using SQL Server 2000 (DTS) but am completely new to SSIS and am trying to find my way around!

     

  • Create a new SSIS project and package. Create string variables for the server name and database name. Create a new connection manager, point it to a server, database. Then right-click the connection manager and select properties. Expand the expressions property and build expressions for ServerName and InitialCatalog using the string variables previously created. Build your ETL tasks, etc. You can then invoke the package using the DTEXEC command along with the /SET parameter to populate the variables at run-time.

    If you need an example, feel free to e-mail me at (freebsdboy@gmail.com) and I can provide you with one.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply