通过Web服务在SSIS包中进行SQL连接

时间:2009-07-20 03:48:59

标签: .net sql-server visual-studio-2008 ssis

我有在VS2008 / SQL2008(目标数据库)中开发的SSISpackage,我的源数据是SQL2005。该包在webservice的.Net框架中执行。执行时遇到 SOURCE Con​​nection 错误 (在连接字符串中使用provider = SQLNCLI10)

得到错误,描述如下。

Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred.
 Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005
 Description: "Login timeout expired".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005
 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005
 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ".

请告诉我如何解决此问题。

1 个答案:

答案 0 :(得分:1)

如果您的凭据不正确,通常会弹出该错误消息。

确保您可以通过Management Studio通过SSIS包中使用的相同凭据连接到服务器。 SQL 10.0驱动程序完全兼容,并且能够连接到SQL 2005框。

但是,大多数情况下,您将其作为SQL Server帐户(SQL Server帐户)运行。而且你正在连接到远程服务器。如果是这种情况,则需要在SQL Server中create a Credential。然后,您必须在SQL Server代理中create a Proxy,并允许它运行SSIS包。然后,将该代理分配为启动程序包的作业步骤的所有者。