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

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.
有机会接着讲。因为这种案例实在太多了。

你可能感兴趣的:(programming,packages)