相信开发过Sql Server SSIS的人都遇到过在数据流中数据源假死的问题,特别是Excel Source特别容易假死,当job执行到数据流中的Excel Source时,既不报错也不执行,也没有任何日志,Job就一直死在这里了。。。然后当你停掉假死的Job,重新执行Job,Excel Source又莫名其妙的顺利执行完成了。。。毫无疑问这是SSIS中的一个Bug,但是问题是如何避免这个Bug。

下面是我收集到的一些关于SSIS中数据流的数据源假死信息,供大家参考:

解决办法一,将数据流中数据源连接器的Delay Validation一定要设置为True: 

I have a Data Flow Task that is hanging on excecution. The flow is simple, makes two queries to different tables (Both with a couple of joins), then sorts and merges the otuputs through a common id, adds a static column to all the records, saves the row count in a user variable for later use and finally inserts into a table on another DB.  We are using OLE DB Sources and Destination. Source is MSSQL 2000 and Destination is MSSQL 2012
Symptoms:

  • When excecuting, the Data Flow gets the usual yellow "running" icon. However when you double click to see the Data Flow, non of the elements have any yellow, red or green mark.
  • This goes on for long periods of time, at first it lasted around 20 minutes, after that it started getting longer or simply not returning at all.
  • Output shows: Information: 0x40043006 at Load Sandbox Table, SSIS.Pipeline: Prepare for Execute phase is beginning. Information: 0x40043007 at Load Sandbox Table, SSIS.Pipeline: Pre-Execute phase is beginning. And nothing more until the excecution is stopped.
  • Yes, this has worked before. And yes, we have used a single query (in a stored procedure) to do this ETL but we wanted to migrate all the steps to SSIS.

Failed solutions:

  • There are no lookups.
  • Default buffer size for the task flow was increased to 40485760 then to 80971520.
  • Default buffer max rows for task was set to 1000000.
  • Delay Validation was set to True for the task.
  • All elements inside the task were set Validate External Data to False.
  • Both queries had: SET FMTONLY OFF;     SET NOCOUNT ON; added at the beggining.
  • Both queries had MAXDOP set to 1.
  • Setting project's Run 64 bit Runtime to False.
  • Changed destination load from Table or View to Table or View - Fast load with no locks or constraints.
  • Set rows per batch to 1000 for fast load.
  • Some work arounds propose to separate the task flow into two or more task flows. But this is not possible since what we need to do is a merge of the information found on both source queries.

Extra bits: I really hope someone can help me. I am fairly new to SSIS, this is the first time I use it. I usually work with Pentaho for my ETL but the client needs the solution to be implemented on SSIS. I've been battling with this issue for a couple of days now and I'm starting to run out of ideas to solve it.


When ran through the command line it gets stuck too and I get the following output:

Progress: 2013-03-19 14:36:26.21
Source: Load Sandbox Table
Validating: 0% complete
End Progress
Progress: 2013-03-19 14:36:26.21
Source: Load Sandbox Table
Validating: 12% complete
End Progress
Progress: 2013-03-19 14:36:26.22
Source: Load Sandbox Table
Validating: 25% complete
End Progress
Progress: 2013-03-19 14:36:26.22
Source: Load Sandbox Table
Validating: 37% complete
End Progress
Progress: 2013-03-19 14:36:26.23
Source: Load Sandbox Table
Validating: 50% complete
End Progress
Progress: 2013-03-19 14:36:26.25
Source: Load Sandbox Table
Validating: 62% complete
End Progress
Progress: 2013-03-19 14:36:26.25
Source: Load Sandbox Table
Validating: 75% complete
End Progress
Progress: 2013-03-19 14:36:26.25
Source: Load Sandbox Table
Validating: 87% complete
End Progress
Progress: 2013-03-19 14:36:26.25
Source: Load Sandbox Table
Validating: 100% complete
End Progress
Warning: 2013-03-19 14:36:26.26
Code: 0x80047076
Source: Load Sandbox Table SSIS.Pipeline
Description: The output column "ITEM_OID (1)" (47) on output "Merge Join Outp
ut" (28) and component "Merge Join" (11) is not subsequently used in the Data Fl
ow task. Removing this unused output column can increase Data Flow task performa
nce.
End Warning
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 0% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 12% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 25% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 37% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 50% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 62% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 75% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 87% complete
End Progress
Progress: 2013-03-19 14:36:26.27
Source: Load Sandbox Table
Prepare for Execute: 100% complete
End Progress
Progress: 2013-03-19 14:36:26.31
Source: Load Sandbox Table
Pre-Execute: 0% complete
End Progress
Progress: 2013-03-19 14:36:26.31
Source: Load Sandbox Table
Pre-Execute: 12% complete
End Progress
Progress: 2013-03-19 14:36:26.31
Source: Load Sandbox Table
Pre-Execute: 25% complete
End Progress
Progress: 2013-03-19 14:36:26.34
Source: Load Sandbox Table
Pre-Execute: 37% complete
End Progress
Progress: 2013-03-19 14:36:45.69
Source: Load Sandbox Table
Pre-Execute: 50% complete
End Progress

After that it freezes again.

SOLUTION (Posting this here because I can't answer my own question for another 5 hours, I'll do it when I'm allowed to.) I finally got it. It turns out there is an issue with the validation, but not only SSIS elements go through that validation, as stated in the fourth failed solution of the question. The CONNECTIONS also get validated and have their own Delay Validation property, which needs to be set to true. After that the excecution time went from 40+ mins or no running to less than a minute for the full process (This is just one step of a much bigger process) I hope people with this same problem can find this solution easily because there's a lot of people running into this problem and nearly no solutions posted online.

In a nutshell:  Check that all your elements involved in the task, including the DB connections have Delay Validation Property set to True.

解决办法二,将Oledb Source中的表或视图改为Sql Command

Fixed my problem by changing the Data access mode to SQL Command and pasting my view into the SQL command text in the OLE DB Source.

解决办法三,将数据流中Source和Destination控件属性中的ValidateExternalMetadata属性设置为False

引用老外的原话

We already had our Delayed Validations set to True and couldnt/didnt want to change it to a SQL statement.
I came across ValidateExternalMetadata in the dataflows which I changed to False and that seem to work like a champ.

SSIS中出现数据流数据源假死状态的解决办法的更多相关文章

  1. IIS关于“ 配置错误 不能在此路径中使用此配置节”的解决办法

    IIS关于“ 配置错误 不能在此路径中使用此配置节”的解决办法 原文链接:http://www.cnblogs.com/200325074/p/3679316.html 今天刚安装好IIS8.5, 我 ...

  2. Excel在任务栏中只显示一个窗口的解决办法

     Excel在任务栏中只显示一个窗口的解决办法  以前朋友遇到过这个问题,这次自己又遇到了,习惯了以前的那种在任务栏中显示全部窗口,方便用Alt+Tab键进行切换. 如果同时打开许多Excel工作簿, ...

  3. 在ASP.net中的UpdatePanel,弹窗失败解决办法

    原文:在ASP.net中的UpdatePanel,弹窗失败解决办法 最开始我用: Response.Write("<script>alert('和哈呵呵呵呵呵呵!')</s ...

  4. Ubuntu中Android SDK Manager无法更新解决办法

    Ubuntu中Android SDK Manager无法更新解决办法http://hi.baidu.com/petercao2008/item/d7a64441f04668e81e19bc1a

  5. 工作总结 EntityFramework中出现DateTime2异常的完美解决办法

    EntityFramework中出现DateTime2异常的完美解决办法   今天在使用entityframework往数据库插入数据的时候,突然出现了一个数据类型转换异常的问题: System.Da ...

  6. 把myeclipse中的web项目导入eclipse中不能编程web项目的解决办法

    title: 把myeclipse中的web项目导入eclipse中不能编程web项目的解决办法 tags: grammar_cjkRuby: true --- 右键单击项目,properties-- ...

  7. WebAPI中无法获取Session对象的解决办法

    在MVC的WebApi中默认是没有开启Session会话支持的.需要在Global中重写Init方法来指定会话需要支持的类型 public override void Init() { PostAut ...

  8. Windows中遇到的些问题及解决办法

    1.win7 无法将程序锁定到任务栏 由于不正确的使用去掉桌面快捷键小箭头等,导致无法将程序固定到任务栏 如:http://jingyan.baidu.com/article/ac6a9a5e41bd ...

  9. asp.net开发中遇到的奇葩bug及解决办法(会持续更新。。。)

    1,不知道你们遇没遇到过,在vs2010或更高版本上运行程序的时候,完全没问题,放在IIS中出现了问题,就比如左侧是菜单项,点击菜单右边显示,如果菜单链接是这样:content.aspx,而另一个链接 ...

随机推荐

  1. 【Codeforces】Helvetic Coding Contest 2017 online mirror比赛记

    第一次打ACM赛制的团队赛,感觉还行: 好吧主要是切水题: 开场先挑着做五道EASY,他们分给我D题,woc什么玩意,还泊松分布,我连题都读不懂好吗! 果断弃掉了,换了M和J,然后切掉了,看N题: l ...

  2. 关于StringBuffe()长度和初始化长度的问题归纳

    晚上做一个习题,发现了一个关于StringBuffer()长度的问题 根据理解大致可以归为以下知识. 直接上代码分析吧 public class StringBuffer_length_capacit ...

  3. Child extends Parent,可以得到什么?

    如果有Child extends Parent 1.子类可以调用父类无参的构造函数,子类的有参构造函数和是否调用父类的有参数的构造函数无必然联系 2.接口继承的时候,只能继承接口不能继承类,因为如果类 ...

  4. IOS地理信息使用

    概览 现在很多社交.电商.团购应用都引入了地图和定位功能,似乎地图功能不再是地图应用和导航应用所特有的.的确,有了地图和定位功能确实让我们的生活更加丰富多彩,极大的改变了我们的生活方式.例如你到了一个 ...

  5. Android ListView实现新闻客户端的新闻内容图文混排

    布局文件: <LinearLayout xmlns:android="<a href="http://schemas.android.com/apk/res/andro ...

  6. Ubuntu 16.04 Apache2 更改访问html根路径方案(可解决403)

    (1)确定html文件在服务器主机上的部署路径.例:/home/rl/vc/ (2)修改 vim sites-enabled/000-default.conf  中 DirectoryRoot 为 : ...

  7. PHP把下划线分隔命名的字符串与驼峰式命名互转

    最近项目使用symfony框架,这个框架对数据库的操作在这个团队里使用的是ORM进行操作,说实话使用ORM的开发效率和运行效率不一定高多少,到是它的实体命名和现有数据库字段的命名不太一样,ORM实体属 ...

  8. Linux下postgres安装fuzzystrmatch其他拓展包

    (1)安装gdal # wget http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz # tar zxvf gdal-2.0.0.tar.gz ...

  9. [翻译] ZLSwipeableView

    ZLSwipeableView A simple view for building card like interface like Tinder and Potluck. ZLSwipeableV ...

  10. 按钮在执行frame动画的时候怎么响应触发事件?

    按钮在执行frame动画的时候怎么响应触发事件? 代码中效果(请注意,我并没有点击到按钮,而是点击到按钮的终点frame值处): 对应的代码: // // ViewController.m // Ta ...