[转]SSIS package taking forever to load when you open it?

SSIS package taking forever to load when you open it?

Posted on July 13, 2011 by James Serra

When you open a SQL Server Integration Services (SSIS) package in SSIS Designer or add components to a package, SSIS by default checks the data sources used by the various components. This process for SSIS package validation ensures that the external metadata is valid.  If the metadata is not valid, you’ll receive warning or error messages pointing to the problem.  At times, you might want to override the default behavior and open the SSIS package without validation because the validation process can take a really long time if you have many data sources and/or some of them are to remote servers with a slow network in between.  If you’re in the process of developing a package and you find yourself opening that package often, you can spend an inordinate amount of time waiting for SSIS to validate sources.  It would be nice if SSIS used a background thread to validate, and let you go about your business, but it instead it freezes the UI and does not let you do anything else.

There are three options around this problem: The DelayValidation property, the ValidateExternalMetadata property, and the “Work Offine” option.

DelayValidation property:

Set the DelayValidation property to True to prevent validation at design time to improve performance.  This property is also used on package elements whose configuration is not valid at design time to prevent validation errors.  For example, you may have a Data Flow task that uses a destination table that does not exist until an Execute SQL task creates the table at run time.  The DelayValidation property can be enabled at the package level or at the level of the individual tasks and containers that the package includes (the property is not available to individual data flow components).  Normally you must leave this property set to True on the same package elements when you deploy the package, to prevent the same validation errors at run time.

Setting the DelayValidation property to True at the task level can be one of the most time-saving steps you take.

Note that setting the DelayValidation property at the package level does not prevent the initial validation process when you open the package.  It simply delays any package-level validation when you run the package.  That means that the package will still run, but a warning will still appear when you open the package.  This is important if you also want to prevent the validation when the package opens.  In this case, you should set the DelayValidation property to True at the task level.

ValidateExternalMetadata property:

As previously mentioned, the DelayValidation property can be set on a Data Flow task, but not on individual data flow components.  You can achieve a similar effect by setting the ValidateExternalMetadata property of individual data flow components (i.e. OLE DB Source component) to False.  However, when the value of this property is False, the component is not aware of changes to the metadata of external data sources.

By default, the ValidateExternalMetadata property is set to True, so SSIS validates the external metadata whenever you open the package, add a component, or run the package. If you override this behavior by setting the property to False, SSIS will not validate the data source until it runs that component.

“Work Offine” option:

It is possible to turn off validation by selecting ‘Work Offline’ from the SSIS menu.  It still validates what can be validated locally without connecting to databases, such as checking file existence.  Still, since most of the validation time is spent connecting to external data sources, the offline validation is very fast.  Just be aware that you will get validation errors.

Unlike the DelayValidation and ValidateExternalMetadata properties, the Work Offline option is available even before you open a package.

When you are ready to run the package you will need to turn off “Work Offline”.  And fortunately it won’t try to validate all the connections when you do turn if off.  It will only validate a task when it is about to execute the task or if it’s a data flow task and you open it.

Be aware that if you have “Work Offline” selected and open a data flow task, it still won’t try to validate the connections.  And tasks that are disabled will still be validated if “Work Offline” is turned off.

Notes:

If database objects that are used by the package are locked when validation occurs, the validation process might stop responding.  In these circumstances, the SSIS Designer also stops responding.  You can resume validation by using Management Studio to close the associated session in SQL Server.  You can also avoid this issue by using the three options described in this section.

It’s a good idea to close all tabs before exiting Visual Studio, as it will remember what packages you had open and then open those packages again when you open the project next time.  So if you don’t have “Work Offline” selected, and have tabs open with a lot of connections, the next time you open that project all those connections will be validated and you will be stuck waiting for it to finish.

More info:

Open SSIS packages without validation using these SQL properties

Troubleshooting Design-time Validation Issues

时间: 2024-10-14 15:03:26

[转]SSIS package taking forever to load when you open it?的相关文章

效率最高的Excel数据导入---(c#调用SSIS Package将数据库数据导入到Excel文件中【附源代码下载】) 转

效率最高的Excel数据导入---(c#调用SSIS Package将数据库数据导入到Excel文件中[附源代码下载])  本文目录: (一)背景 (二)数据库数据导入到Excel的方法比较   (三)SSIS的简介   (四)数据库中存储过程示例(SSIS应用需要) (五)Excel模板的制作(这步这么简单,稍微介绍一下)   (六)SSIS操作过程(生成Package,用来调用)(下一篇随笔将详细讲解制作Package包的过程,图片太多,篇幅过长,因此本文将直接采用生成的Package包进行

ssis package 在调试状态中设置断点,程序 不进入断点 的解决方案

原文:ssis package 在调试状态中设置断点,程序 不进入断点 的解决方案 针对 SSIS intergation 项目 > 属性 > Debug >Run64bITRuntime = False

SSIS Package Configurations 实例

今天学习SSIS Package Configurations,记录一下学习过程 1,将Deployment Model切换到Package Deployment ModelSSIS默认的Deployment Model是Project Deployment Model,右击Project,选择Convert to package deployment model. 2, 在Package中add 一个Variable和一个Execute Sql task,在Execute Sql task中执

SQL Server(SSIS package) call .net DLL

There are two method to call .net DLL in SQLSERVER. The first one is to use the sql clr but it has a lot of limit. The second method is to use SSIS package to call the .net dll. Now I will show the process and the problem you may come accross with it

一次SSIS Package的调试经历

SSIS Package的调试有时是一个非常艰难的过程,由于SSIS 编译器给出的错误信息,可能并不完善,需要程序员根据错误信息抽丝拨茧,寻找错误的根源,进而解决问题. 第一部分:SSIS提供的调试工具 1,SSIS Package的 Control Flow 通过醒目的图标显示task的执行情况 在执行package的时候,如果一个Task上显示绿色的勾,表示task执行正常,如果显示的是红色的X,表示task执行异常. 通常SSIS Package调试的第一步就是寻找出错的Task,然后进入

SSIS Package to Call Web Service

原文 SSIS Package to Call Web Service SSIS Package to Call Web Service. You can Call WebService from SSIS package and transfers your data. First of all you have to create web service with function as  you needed to call. Step1 : Go To Microsoft Visual

SSIS package 在运行时更新 variable

在Package中声明一个variable,在package运行的过程中,SSIS如何update Variable? 第一种方法:使用 Script Task 来更新Variable的值 1,创建一个variable ,VariableName是VarCode,并将变量传递到脚本的ReadWriteVariables数组中. 2,在C#脚本中,SSIS提供两种方式访问变量,第一种方式比较简单,推荐使用. //读写变量 第一种方式 string VarName = this.Dts.Variab

SSIS ->> Package Restartability Fullfilled By Checkoints

Checkpoints are the foundation for restarting packages in SSIS, and they work by writing state information to a ?le after each task completes. This ?le can then be used to determine which tasks have run and which have failed. To ensure that the check

Code Review for SSIS package

以下是我对SSIS包进行code review的一些建议,如果有其他更好的方案欢迎拍砖. A. 查看是否使用了最优的解决方案 1. 最优的结构视图 2. 解决方案,包,任务,组建,参数的命名使用了易读的命名方式 3. 遵循了最优的设计,优化,调整方案 B. 配置 查看是否所有的配置已经成功,并且能够从外部和父包中获得正确的配置信息. C. 查看能否通过以下测试 1. 正常的场景 查看到所有的表数据/文件已经生成并且是正确的 查看所有的数据在表中没有被截断或有不需要的空格/字符 重新执行包,看是否