SQL ssis 包验证错误 ole db 源失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25816842/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 02:37:57  来源:igfitidea点击:

ssis Package validation error ole db source failed

sqlssis-2012

提问by john french

I am getting the following error when I try and run my package. I am new to ssis. Any suggestions. Tahnks

当我尝试运行我的包时出现以下错误。我是 ssis 的新手。有什么建议。塔克斯

===================================

====================================

Package Validation Error (Package Validation Error)

包验证错误(Package Validation Error)

===================================

====================================

Error at Data Flow Task [SSIS.Pipeline]: "OLE DB Source" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

数据流任务 [SSIS.Pipeline] 中的错误:“OLE DB 源”验证失败并返回验证状态“VS_NEEDSNEWMETADATA”。

Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.

数据流任务 [SSIS.Pipeline] 出错:一个或多个组件验证失败。

Error at Data Flow Task: There were errors during task validation.

数据流任务出错:任务验证期间出错。

(Microsoft.DataTransformationServices.VsIntegration)

(Microsoft.DataTransformationServices.VsIntegration)



Program Location:

节目地点:

at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options) at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)

在 Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 标志,IOutputWindow outputWindow,DataTransformationsProjectConfigurationOptions 选项) 在 Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItemService. aunchProjectTransformationProjectConfigurationOptions) Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage. (Int32 launchOptions) 在 Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options) 在 Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions,数据转换项目配置选项选项)

采纳答案by Tarzan

VS_NEEDSNEWMETADATA shows up when the underlying data behind one of the tasks changes. The fastest solution will probably be to just delete and re-create each element which is throwing an error.

当其中一项任务背后的基础数据发生变化时,VS_NEEDSNEWMETADATA 就会出现。最快的解决方案可能是删除并重新创建每个引发错误的元素。

回答by Bhargav J Patel

How about disabling validation checks?

如何禁用验证检查?

Like if you right click on source or destination component and select properties then you will have the property named validateExternalMetadata put that as false and try.

就像如果您右键单击源或目标组件并选择属性,那么您将拥有名为 validateExternalMetadata 的属性将其设置为 false 并尝试。

This Solution is working for me.

这个解决方案对我有用。

回答by Avlio

This normally occurs if there has been a change to your schema, not to stress, just double click on your input and output and it should resolve itself

如果您的架构发生更改,通常会发生这种情况,不要强调,只需双击您的输入和输出,它就会自行解决

回答by Muhammad Yaseen

In my case destination table structure was not matching with matadata in OLEDB component. I added the missing column which i forgot to add and after that it was fixed.

在我的情况下,目标表结构与 OLEDB 组件中的 matadata 不匹配。我添加了我忘记添加的缺失列,之后它被修复了。

回答by Nick H.

Make sure your connection is valid. If you are using dynamic connections, then try to set the option "delay validation" = true on the package or dataflow.

确保您的连接有效。如果您使用的是动态连接,请尝试在包或数据流上设置选项“延迟验证”= true。

回答by Btc Sources

After researching a bit (check to extract your own conclusions: thisand this one), I think I've found a nice workaroundfor when the problem with the metadata comes from a Ole DBobject, but only for a very specific case.

经过一番研究(检查以提取您自己的结论:thisthis one),我想我已经找到了一个很好的解决方法,用于解决元数据问题来自Ole DB对象的情况,但仅限于非常特殊的情况

The thing is that when you change your columns names/ remove columns / add columns, you can't do anything but update the metadata.

问题是,当您更改列名称/删除列/添加列时,您只能更新元数据。

However, if you use a SQL queryto retrieve the data from the object, in the casethat you don't need to update the query itself, you won't need to update the metadata if the query still can ask for what it wants. Basically, if the query is still valid.

但是,如果使用 aSQL query从对象中检索数据,不需要更新查询本身的情况下如果查询仍然可以询问它想要的内容,则不需要更新元数据。基本上,如果查询仍然有效。

I've tried it within my own ETL, and changed an Ole DBobject which was reading the data from an Excelfile, targeting one sheetand then I had all the columns selected in the tab.

我已经在我自己的 ETL 中尝试过它,并更改了一个Ole DBExcel文件中读取数据的对象,目标是一个sheet,然后我在选项卡中选择了所有列。

Changing it for an SQL queryto retrieve the full sheet like:

更改它SQL query以检索完整的工作表,例如:

SELECT * FROM ['Sheet_Name$']

Solved completely the case for me, even introducing files with different metadata in headers.

完全解决了我的情况,甚至在标题中引入了具有不同元数据的文件。