Programming on SSIS - 自定义编程 ( 一 )

本文介绍如何利用C#脚本扩展增强SSIS包的功能,包括自定义源、目标和转换组件,以及如何在C#应用中运行SSIS包。讨论了预编译选项的使用,比较了脚本任务与脚本组件的差异,并详细阐述了三种主要的自定义编程方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I have no idea how to define this blog of its property which identifies its kind of contents.

c#: to invoke the Dts.RunTime namespace to run SSIS packages and enbed the already designed packages in the c# application.
ssis packages: to invode c# to run the applications/codes written in c#. and what is being used in c# script components and script task . Script components would include Source Component, Target Component and Transformation components.

1 script component

  • PreCompile option always be enabled in ssis 2008 and versions later on
    you can have a reference on this at this link :
    http://stackoverflow.com/questions/16329138/where-can-i-find-the-ssis-precompile-property-for-script-tasks-in-sql-server-200

  • PreCompile option is always enabled so the code is always compiled into binary . Its performance is better than the script engine of javascript or vbscript since their interpret engine always perform lately binding compiling.

  • Not like script task, the script component code always built in the package and lives in there. The script task requires the installation of the custom component, such you need generate the Public/Private Keys for your library.

  • Building custom components to test your server’s bandwidth and hardware limit. It’s a lower level consideration.

    1.1 Source component
    just think of the script component as an OOP class , it has four methods that you should overwrite, the most important one is call ‘CreateNewOutputRows’.
    1.1.1 CreateNewOutPutRows(); buffer named by OutputName plus ‘Buffer’
    1.1.2 Pre and Post execute: preexecute and postexecute;
    1.1.3 Connections operation: acquireconnection and releaseconnection;

    1.2 Destination component
    this kind of component performs the target role and has no output.

    1.3 Transformation component
    this kind of component has input and output. And you can specify it as synchronous and asynchronous.

2 script task

  • requires installation of the code library
  • the code requires Dts.Runtime

写了一篇英文的,看着原版的书,很难在中英文之间切换,就顺便做一个总结。
在很多技术中,都会应用到一些难以用自带的组件或者控件可以完成的事情,那么这个时候就需要我们自己动手写代码来完成了。 SSIS 中也一直有类似的扩展,自从 2008 版本之后, 可以用 c# 来做脚本扩展了,功能变得非常强大。

这里主要介绍了两种包级别的自定义编程扩展,其实还有第三种,就是用 c# / VB.net 等 .net 语言来直接生成这个 ssis package.
有机会接着讲。因为这种案例实在太多了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dbLenis

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值