ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SSIS的事件

SSIS的事件

原创 Linux操作系统 作者:windtalker_cs 时间:2012-01-16 18:08:11 0 删除 编辑
最近用SSIS做数据库移植(MSSQL移植到ORACLE),发现有一些数据不能移植过来,主要是字典型的数据。直接用INSERT语句初始化更好一点。找了好久不知道用SSIS执行这些语句。最后发现每个SSIS包都有一个“事件处理程序”窗口。发现有“执行SQL任务”控件,就想能否在第一个“控制流”执行前来执行一些SQL任务实现这个目的。
于是就打开“事件处理程序”窗口,“可执行文件”选择第一个“控制流”任务,“事件处理程序”选择OnPreExecute事件,拖出一个“执行SQL任务”控件,将INSERT 语句放进一个BEGIN END;块里,一测试,OK。但是这里要注意一个问题,每个"执行SQL任务"里的SQL脚本长度是有限制的,所以一个表要是初始很多条语句的话可能要分多个任务来执行了,这个也是后面碰到问题后才发现的。使用结果见后面的图。
其它事件定义:
OnError:The event handler for the OnError event. This event is raised by an executable when an error occurs.



OnExecStatusChanged: The event handler for the OnExecStatusChanged event. This event is raised by an executable when its execution status changes.


OnInformation: The event handler for the OnInformation event. This event is raised during the validation and execution of an executable to report information. This event conveys information only, no errors or warnings.


OnPostExecute: The event handler for the OnPostExecute event. This event is raised by an executable immediately after it has finished running.



OnPostValidate: The event handler for the OnPostValidate event. This event is raised by an executable when its validation is finished.



OnPreExecute:  The event handler for the OnPreExecute event. This event is raised by an executable immediately before it runs.



OnPreValidate:The event handler for the OnPreValidate event. This event is raised by an executable when its validation starts.



OnProgress:The event handler for the OnProgress event. This event is raised by an executable when measurable progress is made by the executable.



OnQueryCancel:The event handler for the OnQueryCancel event. This event is raised by an executable to determine whether it should stop running.


OnTaskFailed:The event handler for the OnTaskFailed event. This event is raised by a task when it fails.


OnVariableValueChanged:  The event handler for the OnVariableValueChanged event. This event is raised by an executable when the value of a variable changes. The event is raised by the executable on which the variable is defined. This event is not raised if you set the RaiseChangeEvent property for the variable to False. For more information, see Integration Services Variables.

OnWarning:The event handler for the OnWarning event. This event is raised by an executable when a warning occurs.









EVENT.jpg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23065269/viewspace-714981/,如需转载,请注明出处,否则将追究法律责任。

上一篇: hadoop学习之初识
请登录后发表评论 登录
全部评论

注册时间:2010-02-24

  • 博文量
    49
  • 访问量
    184857