当前位置:IT168首页 > 技术开发 > 概述
[收藏此页] [打印] [推荐] [评论]

修改存储过程插入自定义的SSIS SQL Server 日志信息

责任编辑:nancy作者:ITPUB论坛   2008-07-08   
文本Tag: 微软 sql

【IT168技术文档】

ALTER PROCEDURE [dbo].[sp_dts_addlogentry] @event sysname, @computer nvarchar(128), @operator nvarchar(128), @source nvarchar(1024), @sourceid uniqueidentifier, @executionid uniqueidentifier, @starttime datetime, @endtime datetime, @datacode int, @databytes image, @message nvarchar(2048)AS INSERT INTO sysdtslog90 ( event, computer, operator, source, sourceid, executionid, starttime, endtime, datacode, databytes, message ) VALUES ( @event, @computer, @operator, @source, @sourceid, @executionid, @starttime, @endtime, @datacode, @databytes,@message ) --在包执行结束的时候,查找,如查不存在OnError 事件,说明该包已经执行成功啦 if @event='PackageEnd' begin if not exists(select * from sysdtslog90 where executionid=@executionid and [event]='OnError' ) begin INSERT INTO sysdtslog90 ( event, computer, operator, source, sourceid, executionid, starttime, endtime, datacode, databytes, message ) VALUES ( 'successed', @computer, @operator, @source, @sourceid, @executionid, @starttime, @endtime, @datacode, @databytes,'包处理成功!' ) end end
上一页
1
下一页
收藏到: 添加到“百度搜藏”添加到“QQ书签”添加到“Google书签”添加到“Yahoo收藏”添加到“和讯网摘”
【内容导航】
本文欢迎转载,转载请注明:转载自IT168 [ http://www.it168.com/ ]
本文链接:http://tech.it168.com/d/2008-07-08/200807081324535.shtml
技术开发相关文章  
  • 暂无
友情推介