Share via


File Connection Manager

A File connection manager enables a package to reference an existing file or folder, or to create a file or folder at run time. Tasks and data flow components in Microsoft SQL Server Integration Services use information in files to perform their work by referencing a File connection manager that is included in the package. For example, an Execute SQL task can reference a file that contains the SQL statements that the task executes.

When you add a File connection manager to a package, Integration Services creates a connection manager that will resolve to a File connection at run time, sets the File connection properties, and adds the File connection to the Connections collection of the package.

The ConnectionManagerType property of the connection manager is set to FILE.

You can configure a File connection manager in the following ways:

  • Specify the usage type.

  • Specify a file or folder.

Usage Types of the File Connection Manager

The FileUsageType property of the File connection manager specifies how the file connection is used. The File connection manager can create a file, create a folder, use an existing file, or use an existing folder.

The following table lists the values of FileUsageType.

Value

Description

0

File connection manager uses an existing file.

1

File connection manager creates a file.

2

File connection manager uses an existing folder.

3

File connection manager creates a folder.

File or Folder Connections

The File connection manager can reference only one file or folder. To reference multiple files or folders, use a Multiple Files connection manager instead of a File connection manager. For more information, see Multiple Files Connection Manager.

You can set the ConnectionString property for the File connection manager by specifying an expression in the Properties window of Business Intelligence Development Studio. However, to avoid a validation error when you use an expression to specify the file or folder, in the File Connection Manager Editor, for File/Folder, add a file or folder path.

Configuring the File Connection Manager

You can set properties through SSIS Designer or programmatically.

For more information about the properties that you can set in SSIS Designer, see File Connection Manager Editor.

For information about configuring a connection manager programmatically, see ConnectionManager and Adding Connections Programmatically.

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.