SQL SSIS 错误:VS_NEEDSNEWMETADATA
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41387663/
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
SSIS Error: VS_NEEDSNEWMETADATA
提问by Jonathan Porter
I'm currently updating all of our ETLs using Visual Studio 2015 (made in BIDS 2008) and redeploying them to a new reporting server running on SQL Server 2016 (originally 2008R2).
我目前正在使用 Visual Studio 2015(在 BIDS 2008 中制作)更新我们所有的 ETL,并将它们重新部署到在 SQL Server 2016(最初是 2008R2)上运行的新报告服务器。
While updating one of the ETLs and trying to run on the new server I got this error:
在更新 ETL 之一并尝试在新服务器上运行时,我收到此错误:
The package execution failed. The step failed.
包执行失败。步骤失败。
Sometimes it also produces this error:
有时它也会产生这个错误:
Source: Load Fact Table SSIS.Pipeline Description: "Copy To Fact Table" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
来源:加载事实表 SSIS.Pipeline 描述:“复制到事实表”验证失败并返回验证状态“VS_NEEDSNEWMETADATA”。
I've tried deleting and re-adding the OLEDB Destination, connection strings and opened up the column mappings to refresh the meta data. I also recreated the whole data flow task but I'm still getting the same error.
我尝试删除并重新添加 OLEDB 目标、连接字符串并打开列映射以刷新元数据。我还重新创建了整个数据流任务,但仍然遇到相同的错误。
The package runs fine on my local machine.
该软件包在我的本地机器上运行良好。
UPDATE:
更新:
I started taking the package apart and running only pieces of it to try and narrow down which part was failing. It seemed to be failing on loading into the staging table but I couldn't find out why.
我开始拆开包装并只运行其中的一部分,以尝试缩小出现故障的部分。似乎无法加载到临时表中,但我找不到原因。
I eventually decided to just try and re-create the whole thing. After re-creating the entire package, still no luck. The picture below is from the event viewer on the server itself but it didn't give me any new information.
我最终决定尝试重新创建整个事情。重新创建整个包后,仍然没有运气。下面的图片来自服务器本身的事件查看器,但它没有给我任何新信息。
回答by Pavithran
I have tried all the solutions provided above and the other sites. Nothing worked.
我已经尝试了上面和其他网站提供的所有解决方案。没有任何效果。
I got a suggestion from my friend Which worked for me.
我从我的朋友那里得到了一个对我有用的建议。
Here are the steps:
以下是步骤:
- Right click on the Source/Target Data flow component.
- Go to Advanced Editor -> Component Properties
- Find ValdateExternalMetadata to False.
- 右键单击源/目标数据流组件。
- 转到高级编辑器 -> 组件属性
- 查找 ValdateExternalMetadata 为False。
Try your luck. This is a pathetic issue and left me clueless for 2 days.
试试你的运气。这是一个可悲的问题,让我无能为力2天。
回答by Jonathan Porter
I finally found the issue and here's how I did it.
我终于找到了这个问题,这就是我是如何做到的。
Because the error messages I was getting from SSMS weren't very insightful I first opened up my remote desktop and logged into the server. Then I went to Administrative Tools>Event Viewer and then Windows Logs>Application to see if the failed event would provide greater detail.
因为我从 SSMS 得到的错误消息不是很有见地,所以我首先打开我的远程桌面并登录到服务器。然后我转到管理工具>事件查看器,然后转到 Windows 日志>应用程序以查看失败的事件是否会提供更多详细信息。
The next step I took was to run the package from the command linebecause the messages should be more verbose. Opened up cmd, changed directory to the one my package was in and then...
我采取的下一步是从命令行运行包,因为消息应该更详细。打开cmd,将目录更改为我的包所在的目录,然后...
DTEXEC /FILE YourPackageName.dtsx
Finally, the error message here showed a missing column in the tables the package was trying to write to. I added those columns and voila!
最后,此处的错误消息显示包尝试写入的表中缺少一列。我添加了这些列,瞧!
回答by Beth
As stated in comments,
if it runs ok in your development environment, then the problem isn't with the package, it's with the scheduled job on the server. Try recreating that.
如评论中所述,
如果它在您的开发环境中运行正常,那么问题不在于包,而在于服务器上的预定作业。尝试重新创建它。
If that doesn't work,
It seems like the server has a cached instance of the package it's using instead of the updated one. Try renaming your package and creating a new job with the new package name and see if that works.
如果这不起作用,
服务器似乎有一个它正在使用的包的缓存实例,而不是更新的包。尝试重命名您的包并使用新的包名称创建一个新作业,看看是否有效。
If that doesn't work, all I can recommend at that point is to cut the package down until it succeeds, then add the next step that fails.
如果这不起作用,那么我当时所能建议的就是将程序包缩小直到它成功,然后添加失败的下一步。
Sounds like from your solution the development environment is more forgiving of schema updates than the deployed solution. Glad you were able to resolve, eliminating clutter helps.
听起来从您的解决方案来看,开发环境比部署的解决方案更能容忍架构更新。很高兴您能够解决问题,消除杂乱有助于解决问题。
回答by Zsombor Zsuffa
I had the same problem and my issue was a difference between two environments, the same field in the same table once was written with a capital and once not. So the name was the same, but with this small difference (e.g. isActive vs IsActive).
我遇到了同样的问题,我的问题是两个环境之间的差异,同一张表中的同一个字段曾经用大写写过,一次没有。所以名字是一样的,但有这么小的区别(例如 isActive 与 IsActive)。
This came from a refactoring effort, where we used VS database publish that did not updated the field name.
这来自重构工作,我们使用了未更新字段名称的 VS 数据库发布。
回答by RaRdEvA
It is very common to get that message when 2 columns in the source file are being inserted into the same field of the table.
当源文件中的 2 列被插入到表的同一字段中时,收到该消息是很常见的。
i.e.
IE
My text file has twice "neighborhood" (same label for different columns) and my table has "neighborhood" and "neighborhoodb" (notice the "b" at the end). The import will try to import both text columns into the field "neighborhood" and ignore the "neighborhoodb" field, it will fail with the "VS_NEEDSNEWMETADATA" error.
我的文本文件有两次“neighborhood”(不同列的标签相同),我的表有“neighborhood”和“neighborhoodb”(注意末尾的“b”)。导入将尝试将两个文本列导入字段“neighborhood”并忽略“neighborhoodb”字段,它将因“VS_NEEDSNEWMETADATA”错误而失败。
回答by Andrew O'Brien
Have you tried deleting and re-creating the source? When I get this I can generally modify OK any object that has the error but have to delete and rebuild the paths between them, however sometimes I have to delete everything in the data flow and re-create it.
您是否尝试删除并重新创建源?当我得到这个时,我通常可以修改任何有错误的对象,但必须删除和重建它们之间的路径,但是有时我必须删除数据流中的所有内容并重新创建它。
回答by tlemaster
A Proxy for SSIS Package Execution should be created under the SQL Server Agent. You should then change your job step (or steps) to Run As the Proxy you've created.
应在 SQL Server 代理下创建 SSIS 包执行代理。然后,您应该将您的工作步骤(或多个步骤)更改为作为您创建的代理运行。
I had your same problem some time ago and the proxy fixed it.
前段时间我遇到了同样的问题,代理修复了它。
Forgive me if you've already tried this.
如果你已经尝试过这个,请原谅我。