SSIS ---DelayValidation property(转载)

浏览: 1649

Package and individual tasks are validated during design phase itself,to delay the validations till execution phase ,there is an option under Properties - > DelayValidation

We can set DelayValidation property to True/False at package/individual tasks level

By default , DelayValidation property  will be set to False

Example for DelayValidation property:

In this example,

1.)we are going to create a  Table(named “Test_DelayValidation”) and insert  some records using Execute SQL Task

2.)In the Data Flow Task, data from  Table - “Test_DelayValidation”  is moved to flatfile using OLE DB Source  & FlatFile Destination

Step 1:  Drag & drop Execute SQL Task into Control Flow tab as shown in below image.




Step 2:Double-click Execute SQL Task and set Connection & SQLStatement as shown in below image.

Step 3:Drag & drop  Data Flow Task into Control Flow tab as shown in below image.

Step 4: In the Data Flow tab ,drag & drop OLE DB Source  & FlatFile Destination as shown in below image.

Step 5: Double-click OLE DB Source ,set OLE DB connection manager: and try as shown in below image.

Step 6:If you click OK ,you will get error as shown in below image. 

Because Table - “Test_DelayValidation” does not exist in the database.

For the purpose of understanding DelayValidation property,create the table in the database which you have mentioned in the OLE DB connection manager

CREATE TABLE Test_DelayValidation (
col1 INT,
col2 VARCHAR(20))
GO





Step 7:Again double-click OLE DB Source , try as shown in below image and then click OK.

Step 8 : Drop the table  and execute the package,you will get error  as shown  in below image  

DROP TABLE Test_DelayValidation

 


Step 9: Now click on Data Flow Task and goto Properties or press F4

and set

DelayValidation property = True as shown in below image 

Step 10 : Now again try to execute the package,

note  Table - “Test_DelayValidation” was dropped at Step 8.

But now  package will run successfully,by setting DelayValidation property = True


推荐 0
本文由 hmily1023 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

0 个评论

要回复文章请先登录注册