我是SQL Server的新手,但不是SQL或编程。我一直在阅读可用的在线文档和教程,以便在SSDT / SSIS中设置一个For循环,循环遍历文件夹中的一系列平面文件,并为每个具有相同名称的文件创建一个DB对象。
循环有效,但为OLE DB目标管理器设置连接字符串除外。我的服务器名为' OLEGS_LAPTOP'使用名为“足球数据”的数据库我正在使用以下连接字符串:
"Provider=SQLNCLI11.0;Server=OLEGS_LAPTOP;Source=(local);Initial Catalog="+ @[User::FileFound] + "Football Data"+";Integrated Security=SSPI;Auto Translate=False;"
此处,@[User::FileFound]
表示在平面文件连接管理器中设置的变量,用于循环浏览我选择的本地文件夹中的文件。当我尝试将此连接字符串用于OLE DB对象时,出现以下错误:
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at Data Flow Task [OLE DB Destination [10]]: 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 11.0" Hresult: 0x80004005 Description: "Unspecified error".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The metadata could not be determined because every code path results in an error; see previous errors for some of these.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Invalid object name 'dbo.OLE DB Destination'.".
Error at Data Flow Task [OLE DB Destination [10]]: Failed to open a fastload rowset for "[dbo].[OLE DB Destination]". Check that the object exists in the database.
Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------
任何人都可以告诉我在字符串中需要更改的内容才能获得所需的结果吗?
由于
继续到目前为止给出的答案/支持:
我现在收到的错误消息是:
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at Data Flow Task [OLE DB Destination [10]]: A destination table name has not been provided.
Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Destination" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------