Share via


OLE DB Connection Manager

An OLE DB connection manager enables a package to connect to a data source by using an OLE DB provider. For example, an OLE DB connection manager that connects to SQL Server 2005 can use the Microsoft OLE DB Provider for SQL Server.

Note

To connect to a data source that uses Microsoft Office Excel 2003 or earlier, use an Excel connection manager. For more information, see Excel Connection Manager. To connect to a data source that uses Microsoft Office Excel 2007, use an OLE DB connection manager, and for Provider, select Microsoft Office 12.0 Access Database Engine OLE DB Provider. Then, on the All page of the Connection Manager dialog box, for Extended Properties, enter Excel 12.0. To load data from or to an Excel 2007 data source, use an OLE DB source or an OLE DB destination, respectively. You cannot use an Excel source or an Excel destination to load data from or to an Excel 2007 data source. To connect to a database that uses Microsoft Office Access 2003 or earlier, use an OLE DB connection manager, and then for Provider, select Microsoft Jet 4.0 OLE DB Provider. To connect to a database that uses Microsoft Office Access 2007, use an OLE DB connection manager, and then for Provider, select Microsoft Office 12.0 Access Database Engine OLE DB Provider. To connect to data sources that use Excel 2007 or Access 2007, you cannot select Microsoft Jet 4.0 OLE DB Provider.

Several SQL Server 2005 Integration Services (SSIS) tasks and data flow components use an OLE DB connection manager. For example, the OLE DB source and OLE DB destination use this connection manager to extract and load data, and the Execute SQL task can use this connection manager to connect to a SQL Server database to run queries.

The OLE DB connection manager is also used to access OLE DB data sources in custom tasks written in unmanaged code that uses a language such as C++.

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

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

You can configure the OLE DB connection manager in the following ways:

  • Provide a specific connection string configured to meet the requirements of the selected provider.
  • Depending on the provider, include the name of the data source to connect to.
  • Provide security credentials as appropriate for the selected provider.
  • Indicate whether the connection that is created from the connection manager is retained at run time.

Troubleshooting the OLE DB Connection Manager

Starting in Microsoft SQL Server 2005 Service Pack 2 (SP2), you are able to log the calls that the OLE DB connection manager makes to external data providers. You can use this new logging capability to troubleshoot the connections that the OLE DB connection manager makes to external data sources. To log the calls that the OLE DB connection manager makes to an external data provider, enable package logging and select the Diagnostic event at the package level. For more information, see Troubleshooting Package Execution.

Configuring the OLE DB Connection Manager

You can set properties through SSIS Designer or programmatically.

For more information about the properties that you can set in SSIS Designer, click one of the following topics:

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

See Also

Concepts

OLE DB Source
OLE DB Destination
Execute SQL Task

Other Resources

Integration Services Connections

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

12 December 2006

New content:
  • Added a note about the use of either Excel 2007 or Access 2007 data sources.
  • Added information about how SQL Server 2005 SP2 includes new logging messages that enable users to troubleshoot calls that the connection manager makes to external data providers.