Integration Services (SSIS) 连接Integration Services (SSIS) Connections

适用对象:是SQL Server,包含 Linux 版 是Azure SQL 数据库 是Azure Synapse Analytics (SQL DW) 否并行数据仓库 APPLIES TO: yesSQL Server, including on Linux yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) noParallel Data Warehouse

MicrosoftMicrosoft SQL ServerSQL Server Integration ServicesIntegration Services 包使用连接来执行不同的任务以及实现 Integration ServicesIntegration Services 功能:SQL ServerSQL Server Integration ServicesIntegration Services packages use connections to perform different tasks and to implement Integration ServicesIntegration Services features:

  • 连接到源和目标数据存储区(如文本、XML、Excel 工作簿和关系数据库),以提取和加载数据。Connecting to source and destination data stores such as text, XML, Excel workbooks, and relational databases to extract and load data.

  • 连接到包含引用数据的关系数据库,以执行完全查找或模糊查找。Connecting to relational databases that contain reference data to perform exact or fuzzy lookups.

  • 连接到关系数据库,以运行 SQL 语句(例如,SELECT、DELETE 和 INSERT 命令)以及存储过程。Connecting to relational databases to run SQL statements such as SELECT, DELETE, and INSERT commands and also stored procedures.

  • 连接到 SQL ServerSQL Server 以执行维护和传输任务,例如,备份数据库和传输登录名。Connecting to SQL ServerSQL Server to perform maintenance and transfer tasks such as backing up databases and transferring logins.

  • 在文本和 XML 文件中以及 SQL ServerSQL Server 表中写入日志项,并将包配置写入 SQL ServerSQL Server 表。Writing log entries in text and XML files and SQL ServerSQL Server tables and package configurations to SQL ServerSQL Server tables.

  • 连接到 SQL ServerSQL Server 以创建某些转换在执行其工作时需要的临时工作表。Connecting to SQL ServerSQL Server to create temporary work tables that some transformations require to do their work.

  • 连接到 Analysis ServicesAnalysis Services 项目和数据库,以访问数据挖掘模型、处理多维数据集和维度,并运行 DDL 代码。Connecting to Analysis ServicesAnalysis Services projects and databases to access data mining models, process cubes and dimensions, and run DDL code.

  • 指定现有的文件和文件夹,或创建新的文件和文件夹,以便用于 Foreach 循环枚举器和任务。Specifying existing or creating new files and folders to use with Foreach Loop enumerators and tasks.

  • 连接到消息队列、Windows Management Instrumentation (WMI)、 SQL ServerSQL Server 管理对象 (SMO)、Web 和邮件服务器。Connecting to message queues and to Windows Management Instrumentation (WMI), SQL ServerSQL Server Management Objects (SMO), Web, and mail servers.

为了创建这些连接, Integration ServicesIntegration Services 使用了连接管理器,如下一部分所述。To make these connections, Integration ServicesIntegration Services uses connection managers, as described in the next section.

连接管理器Connection Managers

Integration ServicesIntegration Services 使用连接管理器作为连接的逻辑表示形式。uses the connection manager as a logical representation of a connection. 在设计时,可设置连接管理器的属性,以描述当包运行时 Integration ServicesIntegration Services 创建的物理连接。At design time, you set the properties of a connection manager to describe the physical connection that Integration ServicesIntegration Services creates when the package runs. 例如,连接管理器包含在设计时设置的 ConnectionString 属性;在运行时,使用该连接字符串属性中的值创建物理连接。For example, a connection manager includes the ConnectionString property that you set at design time; at run time, a physical connection is created using the value in the connection string property.

包可以使用一种连接管理器类型的多个实例,您可以在每个实例上设置这些属性。A package can use multiple instances of a connection manager type, and you can set the properties on each instance. 在运行时,一种连接管理器类型的每个实例创建具有不同属性的连接。At run time, each instance of a connection manager type creates a connection that has different attributes.

SQL ServerSQL Server Integration ServicesIntegration Services 提供了不同类型的连接管理器,从而使得包可以连接到多种数据源和服务器:Integration ServicesIntegration Services provides different types of connection managers that enable packages to connect to a variety of data sources and servers:

  • 提供了内置连接管理器,在您安装 Integration ServicesIntegration Services时安装程序将安装这些连接管理器。There are built-in connection managers that Setup installs when you install Integration ServicesIntegration Services.

  • 提供了可从 MicrosoftMicrosoft 网站下载的连接管理器。There are connection managers that are available for download from the MicrosoftMicrosoft website.

  • 如果现有的连接管理器没有满足您的需求,可以创建自己的自定义连接管理器。You can create your own custom connection manager if the existing connection managers do not meet your needs.

包级别和项目级别连接管理器Package level and project level connection managers

可以在包级别或项目级别创建连接管理器。A connection manager can be created at the package level or at the project level. 在项目级别创建的连接管理器对项目中的所有包可用。The connection manager created at the project level is available all the packages in the project. 而在包级别创建的连接管理器对该特定包可用。Whereas, connection manager created at the package level is available to that specific package.

您使用在项目级别创建的连接管理器来替代数据源将连接共享到源。You use connection managers that are created at the project level in place of data sources, to share connections to sources. 要添加项目级别的连接管理器, Integration ServicesIntegration Services 项目必须使用项目部署模型。To add a connection manager at the project level, the Integration ServicesIntegration Services project must use the project deployment model. 将一个项目配置为使用此模型时, “连接管理器” 文件夹显示在 “解决方案资源管理器” 中,而 “数据源” 文件夹则从 “解决方案资源管理器” 中删除。When a project is configured to use this model, the Connection Managers folder appears in Solution Explorer, and the Data Sources folder is removed from Solution Explorer.

备注

如果您要使用包中的数据源,需要将项目转换为包部署模型。If you want to use data sources in your package, you need to convert the project to the package deployment model.

有关两个模型以及将项目转换为项目部署模型的详细信息,请参阅部署 Integration Services (SSIS) 项目和包For more information about the two models, and about converting a project to the project deployment model, see Deploy Integration Services (SSIS) Projects and Packages.

内置连接管理器Built-in Connection Managers

下表列出了 SQL ServerSQL Server Integration ServicesIntegration Services 提供的连接管理器类型。The following table lists the connection manager types that SQL ServerSQL Server Integration ServicesIntegration Services provides.

类型Type 描述Description 主题Topic
ADOADO 连接到 ActiveX 数据对象 (ADO) 对象。Connects to ActiveX Data Objects (ADO) objects. ADO 连接管理器ADO Connection Manager
ADO.NETADO.NET 使用 .NET 提供程序连接到数据源。Connects to a data source by using a .NET provider. ADO.NET 连接管理器ADO.NET Connection Manager
CACHECACHE 从数据流或从缓存文件 (.caw) 中读取数据,并可将数据保存到缓存文件。Reads data from the data flow or from a cache file (.caw), and can save data to the cache file. 缓存连接管理器Cache Connection Manager
DQSDQS 连接到某一 Data Quality Services 服务器以及该服务器上的 Data Quality Services 数据库。Connects to a Data Quality Services server and a Data Quality Services database on the server. DQS 清理连接管理器DQS Cleansing Connection Manager
EXCELEXCEL 连接到 Excel 工作簿文件。Connects to an Excel workbook file. Excel 连接管理器Excel Connection Manager
FILEFILE 连接到文件或文件夹。Connects to a file or a folder. 文件连接管理器File Connection Manager
FLATFILEFLATFILE 连接到单个平面文件中的数据。Connect to data in a single flat file. 平面文件连接管理器Flat File Connection Manager
FTPFTP 连接到 FTP 服务器。Connect to an FTP server. FTP 连接管理器FTP Connection Manager
HTTPHTTP 连接到 Web 服务器。Connects to a webserver. HTTP 连接管理器HTTP Connection Manager
MSMQMSMQ 连接到消息队列。Connects to a message queue. MSMQ 连接管理器MSMQ Connection Manager
MSOLAP100MSOLAP100 连接到 SQL ServerSQL Server Analysis ServicesAnalysis Services 实例或 Analysis ServicesAnalysis Services 项目。Connects to an instance of SQL ServerSQL Server Analysis ServicesAnalysis Services or an Analysis ServicesAnalysis Services project. Analysis Services 连接管理器Analysis Services Connection Manager
MULTIFILEMULTIFILE 连接到多个文件和文件夹。Connects to multiple files and folders. 多文件连接管理器Multiple Files Connection Manager
MULTIFLATFILEMULTIFLATFILE 连接到多个数据文件和文件夹。Connects to multiple data files and folders. 多平面文件连接管理器Multiple Flat Files Connection Manager
OLEDBOLEDB 使用 OLE DB 访问接口连接到数据源。Connects to a data source by using an OLE DB provider. OLE DB 连接管理器OLE DB Connection Manager
ODBCODBC 使用 ODBC 连接到数据源。Connects to a data source by using ODBC. ODBC 连接管理器ODBC Connection Manager
SMOServerSMOServer 连接到 SQL ServerSQL Server 管理对象 (SMO) 服务器。Connects to a SQL ServerSQL Server Management Objects (SMO) server. SMO 连接管理器SMO Connection Manager
SMTPSMTP 连接到 SMTP 邮件服务器。Connects to an SMTP mail server. SMTP 连接管理器SMTP Connection Manager
SQLMOBILESQLMOBILE 连接到 SQL ServerSQL Server Compact 数据库。Connects to a SQL ServerSQL Server Compact database. SQL Server Compact Edition 连接管理器SQL Server Compact Edition Connection Manager
WMIWMI 连接到服务器,并指定服务器上 Windows Management Instrumentation (WMI) 管理的范围。Connects to a server and specifies the scope of Windows Management Instrumentation (WMI) management on the server. WMI 连接管理器WMI Connection Manager

可供下载的连接管理器Connection Managers available for download

下表列出了可从 MicrosoftMicrosoft 网站下载的其他连接管理器类型。The following table lists additional types of connection manager that you can download from the MicrosoftMicrosoft website.

重要

下表中列出的连接管理器只能用于 Microsoft SQL Server 2012 EnterpriseMicrosoft SQL Server 2012 EnterpriseMicrosoft SQL Server 2012 DeveloperMicrosoft SQL Server 2012 DeveloperThe connection managers listed in the following table work only with Microsoft SQL Server 2012 EnterpriseMicrosoft SQL Server 2012 Enterprise and Microsoft SQL Server 2012 DeveloperMicrosoft SQL Server 2012 Developer.

类型Type 描述Description 主题Topic
ORACLEORACLE 连接到 Oracle <版本信息> 服务器。Connects to an Oracle <version info> server. Oracle 连接管理器是 MicrosoftMicrosoft Connector for Oracle by Attunity 的连接管理器组件。The Oracle connection manager is the connection manager component of the MicrosoftMicrosoft Connector for Oracle by Attunity. MicrosoftMicrosoft Connector for Oracle by Attunity 还包括源和目标。The MicrosoftMicrosoft Connector for Oracle by Attunity also includes a source and a destination. 有关详细信息,请访问下载页 Microsoft Connectors for Oracle and Teradata by AttunityFor more information, see the download page, Microsoft Connectors for Oracle and Teradata by Attunity.
SAPBISAPBI 连接到 SAP NetWeaver BI 7 版系统。Connects to an SAP NetWeaver BI version 7 system. SAP BI 连接管理器是 MicrosoftMicrosoft Connector for SAP BI 的连接管理器组件。The SAP BI connection manager is the connection manager component of the MicrosoftMicrosoft Connector for SAP BI. MicrosoftMicrosoft Connector for SAP BI 还包括源和目标。The MicrosoftMicrosoft Connector for SAP BI also includes a source and a destination. 有关详细信息,请访问下载页 Microsoft SQL Server 2008 功能包For more information, see the download page, Microsoft SQL Server 2008 Feature Pack.
TERADATATERADATA 连接到 Teradata <版本信息> 服务器。Connects to a Teradata <version info> server. Teradata 连接管理器是 MicrosoftMicrosoft Connector for Teradata by Attunity 的连接管理器组件。The Teradata connection manager is the connection manager component of the MicrosoftMicrosoft Connector for Teradata by Attunity. MicrosoftMicrosoft Connector for Teradata by Attunity 还包括源和目标。The MicrosoftMicrosoft Connector for Teradata by Attunity also includes a source and a destination. 有关详细信息,请访问下载页 Microsoft Connectors for Oracle and Teradata by AttunityFor more information, see the download page, Microsoft Connectors for Oracle and Teradata by Attunity.

自定义连接管理器Custom Connection Managers

您还可以编写自定义连接管理器。You can also write custom connection managers. 有关详细信息,请参阅 Developing a Custom Connection ManagerFor more information, see Developing a Custom Connection Manager.

创建连接管理器Create connection managers

Integration ServicesIntegration Services 包含多种连接管理器以满足连接不同类型的服务器和数据源的任务的需要。includes a variety of connection managers to suit the needs of tasks that connect to different types of servers and data sources. 在不同类型的数据存储中提取和加载数据的数据流组件,以及将日志写入服务器、 SQL ServerSQL Server 表或文件的日志提供程序,都使用连接管理器。Connection managers are used by the data flow components that extract and load data in different types of data stores, and by the log providers that write logs to a server, SQL ServerSQL Server table, or file. 例如,具有发送邮件任务的包使用 SMTP 类型的连接管理器来连接到简单邮件传输协议 (SMTP) 服务器。For example, a package with a Send Mail task uses an SMTP connection manager type to connect to a Simple Mail Transfer Protocol (SMTP) server. 具有执行 SQL 任务的包可以使用 OLE DB 连接管理器来连接到 SQL ServerSQL Server 数据库。A package with an Execute SQL task can use an OLE DB connection manager to connect to a SQL ServerSQL Server database. 有关详细信息,请参阅 Integration Services (SSIS) 连接For more information, see Integration Services (SSIS) Connections.

若要在创建新包时自动创建和配置连接管理器,可以使用 SQL ServerSQL Server 导入和导出向导。To automatically create and configure connection managers when you create a new package, you can use the SQL ServerSQL Server Import and Export Wizard. 该向导还有助于创建和配置使用连接管理器的源和目标。The wizard also helps you create and configure the sources and destinations that use the connection managers. 有关详细信息,请参阅 Create Packages in SQL Server Data ToolsFor more information, see Create Packages in SQL Server Data Tools.

若要手动创建新的连接管理器并将其添加到现有包,可以使用在 设计器的 “控制流” “数据流” “事件处理程序” 选项卡上出现的 “连接管理器” SSISSSIS 区域。To manually create a new connection manager and add it to an existing package, you use the Connection Managers area that appears on the Control Flow, Data Flow, and Event Handlers tabs of SSISSSIS Designer. “连接管理器” 区域,选择要创建的连接管理器的类型,并使用 SSISSSIS 设计器提供的对话框设置连接管理器的属性。From the Connection Manager area, you choose the type of connection manager to create, and then set the properties of the connection manager by using a dialog box that SSISSSIS Designer provides. 有关详细信息,请参阅本主题后面的“使用连接管理器区域”部分。For more information, see the section, "Using the Connection Managers Area," later in this topic.

将连接管理器添加到包之后,可以在任务、Foreach 循环容器、源、转换和目标中使用它。After the connection manager is added to a package, you can use it in tasks, Foreach Loop containers, sources, transformations, and destinations. 有关详细信息,请参阅 Integration Services 任务Foreach 循环容器数据流For more information, see Integration Services Tasks, Foreach Loop Container, and Data Flow.

使用连接管理器区域Using the Connection Managers Area

可以在 设计器的“控制流” “数据流” “事件处理程序” SSISSSIS 选项卡活动时创建连接管理器。You can create connection managers while the Control Flow, Data Flow, or Event Handlers tab of SSISSSIS Designer is active.

以下关系图显示 设计器的 “控制流” 选项卡上的 “连接管理器” SSISSSIS 区域。The following diagram shows the Connection Managers area on the Control Flow tab of SSISSSIS Designer.

具有包的控制流设计器的屏幕快照Screenshot of control flow designer with package

用于连接管理器的 32 位和 64 位提供程序32-Bit and 64-Bit Providers for Connection Managers

连接管理器所使用的很多提供程序都有 32 位和 64 位版本。Many of the providers that connection managers use are available in 32-bit and 64-bit versions. Integration ServicesIntegration Services 设计环境是 32 位环境,设计包时您只能看到 32 位提供程序。The Integration ServicesIntegration Services design environment is a 32-bit environment and you see only 32-bit providers while you are designing a package. 因此,如果还安装了同一个提供程序的 32 位版本,则只能将连接管理器配置为使用特定的 64 位提供程序。Therefore, you can only configure a connection manager to use a specific 64-bit provider if the 32-bit version of the same provider is also installed.

在运行时,系统将使用正确的版本,即使在设计时指定了 32 位版本的提供程序也没有关系。At run time, the correct version is used, and it does not matter that you specified the 32-bit version of the provider at design time. 即使包运行在 SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT) 中,也可以运行 64 位版本的提供程序。The 64-bit version of the provider can be run even if the package is run in SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT).

两种版本的提供程序都有相同的 ID。Both versions of the provider have the same ID. 若要指定 Integration ServicesIntegration Services 运行时是否使用可用的 64 位版本的提供程序,需要设置 Integration ServicesIntegration Services 项目的 Run64BitRuntime 属性。To specify whether the Integration ServicesIntegration Services runtime uses an available 64-bit version of the provider, you set the Run64BitRuntime property of the Integration ServicesIntegration Services project. 如果将 Run64BitRuntime 属性设置为 true,运行时将发现并使用该 64 位提供程序;如果 Run64BitRuntime 为 false,则运行时将发现并使用 32 位提供程序。If the Run64BitRuntime property is set to true, the runtime finds and uses the 64-bit provider; if Run64BitRuntime is false, the runtime finds and uses the 32-bit provider. 有关可以对 Integration ServicesIntegration Services 项目进行设置的属性的详细信息,请参阅 Integration Services (SSIS) 与 Studio 环境For more information about properties you can set on Integration ServicesIntegration Services projects, see Integration Services &(SSIS) and Studio Environments.

添加连接管理器Add a connection manager

创建包时添加连接管理器Add a connection manager when you create a package

  • 使用 SQL ServerSQL Server 导入和导出向导Use the SQL ServerSQL Server Import and Export Wizard

    除了创建和配置连接管理器之外,该向导还有助于创建和配置使用该连接管理器的源和目标。In addition to creating and configuring a connection manager, the wizard also helps you create and configure the sources and destinations that use the connection manager. 有关详细信息,请参阅 Create Packages in SQL Server Data ToolsFor more information, see Create Packages in SQL Server Data Tools.

向现有包中添加连接管理器Add a connection manager to an existing package

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,打开包含所需包的 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project that contains the package you want.

  2. 在“解决方案资源管理器”中,双击该包将其打开In Solution Explorer, double-click the package to open it

  3. SSISSSIS 设计器中,单击 “控制流” 选项卡、 “数据流” 选项卡或 “事件处理程序” 选项卡,以使 “连接管理器” 区域可用。In SSISSSIS Designer, click the Control Flow tab, the Data Flow tab, or the Event Handler tab to make the Connection Managers area available.

  4. 右键单击“连接管理器” 区域中的任意位置,然后执行下列操作之一:Right-click anywhere in the Connection Managers area, and then do one of the following:

    • 单击要添加到包中的连接管理器类型。Click the connection manager type to add to the package.

      -或 --or-

    • 如果没有列出您要添加的类型,请单击 “新建连接” 打开 “添加 SSIS 连接管理器” 对话框,选择某种连接管理器类型,然后单击 “确定”If the type that you want to add is not listed, click New Connection to open the Add SSIS Connection Manager dialog box, select a connection manager type, and then click OK.

    随即打开与所选连接管理器类型对应的自定义对话框。The custom dialog box for the selected connection manager type opens. 有关连接管理器类型以及可用选项的详细信息,请参阅下面的选项表。For more information about connection manager types and the options that are available, see the following options table.

    “ODBC 源编辑器”Connection manager 选项Options
    ADO 连接管理器ADO Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    ADO.NET 连接管理器ADO.NET Connection Manager 配置 ADO.NET 连接管理器Configure ADO.NET Connection Manager
    Analysis Services 连接管理器Analysis Services Connection Manager “添加 Analysis Services 连接管理器”对话框 UI 参考Add Analysis Services Connection Manager Dialog Box UI Reference
    Excel 连接管理器Excel Connection Manager Excel 连接管理器编辑器Excel Connection Manager Editor
    文件连接管理器File Connection Manager 文件连接管理器编辑器File Connection Manager Editor
    多文件连接管理器Multiple Files Connection Manager “添加文件连接管理器”对话框 UI 参考Add File Connection Manager Dialog Box UI Reference
    平面文件连接管理器Flat File Connection Manager 平面文件连接管理器编辑器(“常规”页)Flat File Connection Manager Editor (General Page)

    平面文件连接管理器编辑器(“列”页)Flat File Connection Manager Editor (Columns Page)

    平面文件连接管理器编辑器(“高级”页)Flat File Connection Manager Editor (Advanced Page)

    平面文件连接管理器编辑器(“预览”页)Flat File Connection Manager Editor (Preview Page)
    多平面文件连接管理器Multiple Flat Files Connection Manager 多平面文件连接管理器编辑器(“常规”页)Multiple Flat Files Connection Manager Editor (General Page)

    多平面文件连接管理器编辑器(“列”页)Multiple Flat Files Connection Manager Editor (Columns Page)

    多平面文件连接管理器编辑器(“高级”页)Multiple Flat Files Connection Manager Editor (Advanced Page)

    多平面文件连接管理器编辑器(“预览”页)Multiple Flat Files Connection Manager Editor (Preview Page)
    FTP 连接管理器FTP Connection Manager FTP 连接管理器编辑器FTP Connection Manager Editor
    HTTP 连接管理器HTTP Connection Manager HTTP 连接管理器编辑器(“服务器”页)HTTP Connection Manager Editor (Server Page)

    HTTP 连接管理器编辑器(“代理”页)HTTP Connection Manager Editor (Proxy Page)
    MSMQ 连接管理器MSMQ Connection Manager MSMQ 连接管理器编辑器MSMQ Connection Manager Editor
    ODBC 连接管理器ODBC Connection Manager ODBC 连接管理器 UI 参考ODBC Connection Manager UI Reference
    OLE DB 连接管理器OLE DB Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    SMO 连接管理器SMO Connection Manager SMO 连接管理器编辑器SMO Connection Manager Editor
    SMTP 连接管理器SMTP Connection Manager SMTP 连接管理器编辑器SMTP Connection Manager Editor
    SQL Server Compact Edition 连接管理器SQL Server Compact Edition Connection Manager SQL Server Compact Edition 连接管理器编辑器(“连接”页)SQL Server Compact Edition Connection Manager Editor (Connection Page)

    SQL Server Compact Edition 连接管理器编辑器(“全部”页)SQL Server Compact Edition Connection Manager Editor (All Page)
    WMI 连接管理器WMI Connection Manager WMI 连接管理器编辑器WMI Connection Manager Editor

    “连接管理器” 区域列出已添加的连接管理器。The Connection Managers area lists the added connection manager.

  5. 还可以右键单击连接管理器,单击“重命名” ,然后修改连接管理器的默认名称。Optionally, right-click the connection manager, click Rename, and then modify the default name of the connection manager.

  6. 若要保存更新后的包,请单击 “文件” 菜单上的 “保存选定项”To save the updated package, click Save Selected Item on the File menu.

在项目级别添加连接管理器Add a connection manager at the project level

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中打开 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project.

  2. 在“解决方案资源管理器” 中,右键单击“连接管理器” 单击“新建连接管理器” 。In Solution Explorer, right-click Connection Managers, and click New Connection Manager.

  3. “添加 SSIS 连接管理器” 对话框中,选择连接管理器的类型,然后单击 “添加”In the Add SSIS Connection Manager dialog box, select the type of connection manager, and then click Add.

    随即打开与所选连接管理器类型对应的自定义对话框。The custom dialog box for the selected connection manager type opens. 有关连接管理器类型以及可用选项的详细信息,请参阅下面的选项表。For more information about connection manager types and the options that are available, see the following options table.

    “ODBC 源编辑器”Connection manager 选项Options
    ADO 连接管理器ADO Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    ADO.NET 连接管理器ADO.NET Connection Manager 配置 ADO.NET 连接管理器Configure ADO.NET Connection Manager
    Analysis Services 连接管理器Analysis Services Connection Manager “添加 Analysis Services 连接管理器”对话框 UI 参考Add Analysis Services Connection Manager Dialog Box UI Reference
    Excel 连接管理器Excel Connection Manager Excel 连接管理器编辑器Excel Connection Manager Editor
    文件连接管理器File Connection Manager 文件连接管理器编辑器File Connection Manager Editor
    多文件连接管理器Multiple Files Connection Manager “添加文件连接管理器”对话框 UI 参考Add File Connection Manager Dialog Box UI Reference
    平面文件连接管理器Flat File Connection Manager 平面文件连接管理器编辑器(“常规”页)Flat File Connection Manager Editor (General Page)

    平面文件连接管理器编辑器(“列”页)Flat File Connection Manager Editor (Columns Page)

    平面文件连接管理器编辑器(“高级”页)Flat File Connection Manager Editor (Advanced Page)

    平面文件连接管理器编辑器(“预览”页)Flat File Connection Manager Editor (Preview Page)
    多平面文件连接管理器Multiple Flat Files Connection Manager 多平面文件连接管理器编辑器(“常规”页)Multiple Flat Files Connection Manager Editor (General Page)

    多平面文件连接管理器编辑器(“列”页)Multiple Flat Files Connection Manager Editor (Columns Page)

    多平面文件连接管理器编辑器(“高级”页)Multiple Flat Files Connection Manager Editor (Advanced Page)

    多平面文件连接管理器编辑器(“预览”页)Multiple Flat Files Connection Manager Editor (Preview Page)
    FTP 连接管理器FTP Connection Manager FTP 连接管理器编辑器FTP Connection Manager Editor
    HTTP 连接管理器HTTP Connection Manager HTTP 连接管理器编辑器(“服务器”页)HTTP Connection Manager Editor (Server Page)

    HTTP 连接管理器编辑器(“代理”页)HTTP Connection Manager Editor (Proxy Page)
    MSMQ 连接管理器MSMQ Connection Manager MSMQ 连接管理器编辑器MSMQ Connection Manager Editor
    ODBC 连接管理器ODBC Connection Manager ODBC 连接管理器 UI 参考ODBC Connection Manager UI Reference
    OLE DB 连接管理器OLE DB Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    SMO 连接管理器SMO Connection Manager SMO 连接管理器编辑器SMO Connection Manager Editor
    SMTP 连接管理器SMTP Connection Manager SMTP 连接管理器编辑器SMTP Connection Manager Editor
    SQL Server Compact Edition 连接管理器SQL Server Compact Edition Connection Manager SQL Server Compact Edition 连接管理器编辑器(“连接”页)SQL Server Compact Edition Connection Manager Editor (Connection Page)

    SQL Server Compact Edition 连接管理器编辑器(“全部”页)SQL Server Compact Edition Connection Manager Editor (All Page)
    WMI 连接管理器WMI Connection Manager WMI 连接管理器编辑器WMI Connection Manager Editor

    您添加的连接管理器将显示在 “解决方案资源管理器” 中的 “连接管理器” 节点下。The connection manager you added will show up under the Connections Managers node in the Solution Explorer. 它还将显示在项目中所有包的 “SSIS 设计器” 窗口的 “连接管理器” 选项卡中。It will also appear in the Connection Managers tab in the SSIS Designer window for all the packages in the project. 此选项卡中的连接管理器名称具有 (project) 前缀,以便将此项目级别的连接管理器与包级别的连接管理器区别开来。The name of the connection manager in this tab will have a (project) prefix in order to differentiate this project level connection manager from the package level connection managers.

  4. 或者,在“解决方案资源管理器” 窗口中的“连接管理器” 节点下或在“SSIS 设计器” 窗口的“连接管理器” 选项卡中,右键单击连接管理器,再单击“重命名” ,然后修改连接管理器的默认名称。Optionally, right-click the connection manager in the Solution Explorer window under Connection Managers node (or) in the Connection Managers tab of the SSIS Designer window, click Rename, and then modify the default name of the connection manager.

    备注

    在“SSIS 设计器”窗口的“连接管理器”选项卡中,不能覆盖连接管理器名称中的 (project) 前缀 。In the Connection Managers tab of the SSIS Designer window, you won't be able to overwrite the (project) prefix from the connection manager name. 这是设计的结果。This is by design.

添加 SSIS 连接管理器对话框Add SSIS Connection Manager dialog box

使用 “添加 SSIS 连接管理器” 对话框可以选择要为包添加的连接类型。Use the Add SSIS Connection Manager dialog box to select the type of connection to add to a package.

若要了解有关连接管理器的详细信息,请参阅 Integration Services (SSIS) 连接To learn more about connection managers, see Integration Services (SSIS) Connections.

选项Options

连接管理器类型Connection manager type
选择一个连接类型,再单击“添加”,或双击一个连接类型,使用与各连接类型相应的编辑器来指定连接属性。 Select a connection type and then click Add, or double-click a connection type, to specify connection properties using the editor for each type of connection.

“添加”Add
使用与各连接类型相应的编辑器指定连接属性。Specify connection properties using the editor for each type of connection.

创建连接管理器属性的参数Create a parameter for a connection manager property

  1. 在“连接管理器” 区域中,右键单击要为其创建参数的连接管理器,然后单击“参数化” 。In the Connection Managers area, right-click the connection manager that you want to create a parameter for and then click Parameterize.

  2. “参数化” 对话框中配置参数设置。Configure the parameter settings in the Parameterize dialog box. 有关详细信息,请参阅 Parameterize Dialog BoxFor more information, see Parameterize Dialog Box.

删除连接管理器Delete a connection manager

从包中删除连接管理器Delete a connection manager from a package

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,打开包含所需包的 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project that contains the package you want.

  2. 在解决方案资源管理器中,双击该包将其打开。In Solution Explorer, double-click the package to open it.

  3. SSISSSIS 设计器中,单击 “控制流” 选项卡、 “数据流” 选项卡或 “事件处理程序” 选项卡,以使 “连接管理器” 区域可用。In SSISSSIS Designer, click the Control Flow tab, the Data Flow tab, or the Event Handler tab to make the Connection Managers area available.

  4. 右键单击要删除的连接管理器,然后单击“删除” 。Right-click the connection manager that you want to delete, and then click Delete.

    如果删除包元素(例如执行 SQL 任务或 OLE DB 源)使用的连接管理器,您会得到以下结果:If you delete a connection manager that a package element, such as an Execute SQL task or an OLE DB source, uses, you will experience the following results:

    • 使用已删除的连接管理器的包元素上会出现错误图标。An error icon appears on the package element that used the deleted connection manager.

    • 包验证失败。The package fails to validate.

    • 包无法运行。The package cannot be run.

  5. 若要保存更新后的包,请单击 “文件” 菜单上的 “保存选定项”To save the updated package, click Save Selected Items on the File menu.

删除共享连接管理器(项目级别连接管理器)Delete a shared connection manager (project level connection manager)

  1. 若要删除项目级别的连接管理器,请在“解决方案资源管理器” 窗口的“连接管理器” 节点下,右键单击连接管理器,然后单击“删除” 。To delete a project-level connection manager, right-click the connection manager under Connection Managers node in the Solution Explorer window, and then click Delete. SQL Server Data ToolsSQL Server Data Tools 显示下面的警告消息:displays the following warning message:

    警告

    在您删除某一项目连接管理器后,使用该连接管理器的包可能会不运行。When you delete a project connection manager, packages that use the connection manager might not run. 不能撤消此操作。You cannot undo this action. 是否要删除该连接管理器?Do you want to delete the connection manager?

  2. 单击“确定”将删除该连接管理器,单击“取消”将保留它。Click OK to delete the connection manager or Cancel to keep it.

    备注

    您也可以从为项目中任何包打开的 “SSIS 设计器” 窗口的 “连接管理器” 选项卡中删除项目级别的连接管理器。You can also delete a project level connection manager from the Connection Manager tab of the SSIS Designer window opened for any package in the project. 为此,右键单击此选项卡中的连接管理器,然后单击“删除” 。You do so by right-clicking the connection manager in the tab and then by clicking Delete.

设置连接管理器的属性Set the Properties of a Connection Manager

所有连接管理器都可以使用 “属性” 窗口进行配置。All connection managers can be configured using the Properties window.

Integration ServicesIntegration Services 还提供了用于在 Integration ServicesIntegration Services 中修改不同类型的连接管理器的自定义对话框。also provides custom dialog boxes for modifying the different types of connection managers in Integration ServicesIntegration Services. 对话框中所包含的选项集将因连接管理器类型的不同而变化。The dialog box has a different set of options depending on the connection manager type.

使用“属性”窗口修改连接管理器Modify a connection manager using the Properties window

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,打开包含所需包的 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project that contains the package you want.

  2. 在解决方案资源管理器中,双击该包将其打开。In Solution Explorer, double-click the package to open it.

  3. 在 SSIS 设计器中,单击 “控制流” 选项卡、 “数据流” 选项卡或 “事件处理程序” 选项卡,以使 “连接管理器” 区域可用。In SSIS Designer, click the Control Flow tab, the Data Flow tab, or the Event Handler tab to make the Connection Managers area available.

  4. 右键单击该连接管理器,再单击“属性” 。Right-click the connection manager and click Properties.

  5. “属性” 窗口中,编辑属性值。In the Properties window, edit the property values. “属性” 窗口提供对在连接管理器的标准编辑器中无法配置的一些属性的访问。The Properties window provides access to some properties that are not configurable in the standard editor for a connection manager.

  6. 单击“确定” 。Click OK.

  7. 若要保存更新后的包,请单击 “文件” 菜单上的 “保存选定项”To save the updated package, click Save Selected Items on the File menu.

使用连接管理器对话框修改连接管理器Modify a connection manager using a connection manager dialog box

  1. SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT)中,打开包含所需包的 Integration ServicesIntegration Services 项目。In SQL Server Data Tools (SSDT)SQL Server Data Tools (SSDT), open the Integration ServicesIntegration Services project that contains the package you want.

  2. 在解决方案资源管理器中,双击该包将其打开。In Solution Explorer, double-click the package to open it.

  3. SSISSSIS 设计器中,单击 “控制流” 选项卡、 “数据流” 选项卡或 “事件处理程序” 选项卡,以使 “连接管理器” 区域可用。In SSISSSIS Designer, click the Control Flow tab, the Data Flow tab, or the Event Handler tab to make the Connection Managers area available.

  4. 在“连接管理器”区域中,双击连接管理器以打开“连接管理器”对话框 。In the Connection Managers area, double-click the connection manager to open the Connection Manager dialog box. 有关特定连接管理器类型以及每种类型可用的选项的信息,请参阅下表。For information about specific connection manager types, and the options available for each type, see the following table.

    “连接管理器”Connection manager 选项Options
    ADO 连接管理器ADO Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    ADO.NET 连接管理器ADO.NET Connection Manager 配置 ADO.NET 连接管理器Configure ADO.NET Connection Manager
    Analysis Services 连接管理器Analysis Services Connection Manager “添加 Analysis Services 连接管理器”对话框 UI 参考Add Analysis Services Connection Manager Dialog Box UI Reference
    Excel 连接管理器Excel Connection Manager Excel 连接管理器编辑器Excel Connection Manager Editor
    文件连接管理器File Connection Manager 文件连接管理器编辑器File Connection Manager Editor
    多文件连接管理器Multiple Files Connection Manager “添加文件连接管理器”对话框 UI 参考Add File Connection Manager Dialog Box UI Reference
    平面文件连接管理器Flat File Connection Manager 平面文件连接管理器编辑器(“常规”页)Flat File Connection Manager Editor (General Page)

    平面文件连接管理器编辑器(“列”页)Flat File Connection Manager Editor (Columns Page)

    平面文件连接管理器编辑器(“高级”页)Flat File Connection Manager Editor (Advanced Page)

    平面文件连接管理器编辑器(“预览”页)Flat File Connection Manager Editor (Preview Page)
    多平面文件连接管理器Multiple Flat Files Connection Manager 多平面文件连接管理器编辑器(“常规”页)Multiple Flat Files Connection Manager Editor (General Page)

    多平面文件连接管理器编辑器(“列”页)Multiple Flat Files Connection Manager Editor (Columns Page)

    多平面文件连接管理器编辑器(“高级”页)Multiple Flat Files Connection Manager Editor (Advanced Page)

    多平面文件连接管理器编辑器(“预览”页)Multiple Flat Files Connection Manager Editor (Preview Page)
    FTP 连接管理器FTP Connection Manager FTP 连接管理器编辑器FTP Connection Manager Editor
    HTTP 连接管理器HTTP Connection Manager HTTP 连接管理器编辑器(“服务器”页)HTTP Connection Manager Editor (Server Page)

    HTTP 连接管理器编辑器(“代理”页)HTTP Connection Manager Editor (Proxy Page)
    MSMQ 连接管理器MSMQ Connection Manager MSMQ 连接管理器编辑器MSMQ Connection Manager Editor
    ODBC 连接管理器ODBC Connection Manager ODBC 连接管理器 UI 参考ODBC Connection Manager UI Reference
    OLE DB 连接管理器OLE DB Connection Manager 配置 OLE DB 连接管理器Configure OLE DB Connection Manager
    SMO 连接管理器SMO Connection Manager SMO 连接管理器编辑器SMO Connection Manager Editor
    SMTP 连接管理器SMTP Connection Manager SMTP 连接管理器编辑器SMTP Connection Manager Editor
    SQL Server Compact Edition 连接管理器SQL Server Compact Edition Connection Manager SQL Server Compact Edition 连接管理器编辑器(“连接”页)SQL Server Compact Edition Connection Manager Editor (Connection Page)

    SQL Server Compact Edition 连接管理器编辑器(“全部”页)SQL Server Compact Edition Connection Manager Editor (All Page)
    WMI 连接管理器WMI Connection Manager WMI 连接管理器编辑器WMI Connection Manager Editor
  5. 若要保存更新后的包,请单击 “文件” 菜单上的 “保存选定项”To save the updated package, click Save Selected Items on the File menu.