在执行Package时,SSISDB都会创建唯一的OperationID 和 ExecutionID,标识对package执行的操作和执行实例(Execution Instance),并记录operation message,统计executable的执行时间,便于developers 优化package的设计,对package进行故障排除。

一,在package发生错误时,查看失败的Executable

An executable is a task or container that you add to the control flow of a package.

select e.project_name,
opt.operation_type_descr as Operation,
obt.object_type_descr as object_type,
e.object_id,
ops.operation_status_descr as operation_status,
et.package_name,
et.package_path as ExecutablePath,--relative path
--es.execution_path as ExecutableFullPath,
et.executable_name,
cast(es.execution_duration/1000/60.0 as decimal(10,1))as Duration_M,
er.execution_result_descr as execution_result,
es.start_time
--,es.end_time,
from catalog.executions e
inner join helper.OperationType opt
on e.operation_type=opt.operation_type
inner join helper.ObjectType obt
on e.object_type=obt.object_type
inner join helper.OperationStatus ops
on e.status=ops.operation_status
inner join catalog.executables et
on e.execution_id=et.execution_id
inner join catalog.executable_statistics es
on et.executable_id=es.executable_id and et.execution_id=es.execution_id
inner join helper.ExecutionResult er
on es.execution_result=er.execution_result
where e.execution_id=104627 --Specified ExecutionID
--and es.execution_result=1 -- 1 (Failure)
--and et.package_name=N'PackageName.dtsx'
order by et.package_name,es.start_time

二,查看Operation记录的message

1, SSIS 记录海量的Operation Message 和Event Message 数据,在查看这些文本信息时,应该设置好查询条件。

select
opt.operation_type_descr as Operation,
obt.object_type_descr as object_type,
o.object_name,
ops.operation_status_descr as OperationStatus,
mt.message_type_descr as message_type,
mst.message_source_descr,
om.message,
om.message_time
from catalog.operations o
inner join helper.OperationType opt
on o.operation_type=opt.operation_type
inner join helper.ObjectType obt
on o.object_type=obt.object_type
inner join helper.OperationStatus ops
on o.status=ops.operation_status
inner join catalog.operation_messages om
on o.operation_id=om.operation_id
inner join helper.MessageType mt
on om.message_type=mt.message_type
inner join helper.MessageSourceType mst
on om.message_source_type=mst.message_source_type
where o.operation_id =104627
and om.message_type in
(
120,--Error
110,--Warning
130--TaskFailed
)
order by om.message_time desc

2,查看Operation 的Event message,对Package进行troubleshoot时,Event Message非常有用

select
opt.operation_type_descr as Operation,
obt.object_type_descr as object_type,
o.object_name,
ops.operation_status_descr as OperationStatus,
em.event_message_id,
em.package_name,
em.event_name,
em.message_source_name,
em.subcomponent_name,
mt.message_type_descr as message_type,
mst.message_source_descr as message_source_type,
em.package_path,
em.event_message_id,
em.message_time,
em.message
from catalog.operations o
inner join helper.OperationType opt
on o.operation_type=opt.operation_type
inner join helper.OperationStatus ops
on o.status=ops.operation_status
inner join helper.ObjectType obt
on o.object_type=obt.object_type
inner join catalog.event_messages em
on o.operation_id=em.operation_id
inner join helper.MessageType mt
on em.message_type=mt.message_type
inner join helper.MessageSourceType mst
on em.message_source_type=mst.message_source_type
where o.operation_id =104627
and em.message_type in
(
120, --Error
110, --Warning
130 --TaskFailed;
)
--and em.package_name=N'PackageName.dtsx'
order by em.message_time desc

3,查看Event Message 的Context,以及相应的Property 和PropertyValue,这是最底层的SSIS 执行时Event 记录的值,能够查看到Package执行时的连接字符串的值

select emc.context_depth,
emc.package_path,
ct.context_type_name as context_type,
emc.context_source_name,
emc.property_name,
emc.property_value
from catalog.event_message_context emc
inner join helper.ContextType ct
on emc.context_type=ct.context_type
where emc.event_message_id=23929777
and emc.context_type=70

Appendix:

关于辅助表,请参考《SSISDB6:Operation》的附件

参考文档:

Views (Integration Services Catalog)

SSIS Catalog

SSISDB8:查看SSISDB记录Package执行的消息的更多相关文章

  1. SSISDB8:使用SSISDB记录的消息Troubleshoot packages

    在执行Package时,SSISDB都会创建唯一的OperationID 和 ExecutionID,标识对package执行的操作和执行实例(Execution Instance),并记录opera ...

  2. SSISDB1:使用SSISDB管理Package

    SSISDB 系列随笔汇总: SSISDB1:使用SSISDB管理Package SSISDB2:SSIS工程的操作实例 SSISDB3:Package的执行实例 SSISDB4:当前正在运行的Pac ...

  3. 【.net 深呼吸】记录WCF的通信消息

    前面老周给大伙伴们介绍了把跟踪信息写入日志文件的方法,今天咱们换个类似的话题来扯一下,对了,咱们就说说怎么把WCF的往来消息log下来吧. 尽管在现实生活中,我们不主张偷窥他人信息,不过,偷窥程序信息 ...

  4. 【公众号系列】在SAP里查看条件记录的方法

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[公众号系列]在SAP里查看条件记录的方法   ...

  5. 【ORACLE】记录通过执行Oracle的执行计划查询SQL脚本中的效率问题

    记录通过执行Oracle的执行计划查询SQL脚本中的效率问题   问题现象: STARiBOSS5.8.1R2版本中,河北对帐JOB执行时,无法生成发票对帐文件.   首先,Quartz表达式培植的启 ...

  6. crontab 各参数详解及如何查看日志记录

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt145 crontab各参数说明: crontab [-u user] [fi ...

  7. RDIFramework.NET ━ .NET快速信息化系统开发框架 V3.2->新增记录SQL执行过程

    有时我们需要记录整个系统运行的SQL以作分析,特别是在上线前这对我们做内部测试也非常有帮助,当然记录SQL的方法有很多,也可以使用三方的组件.3.2版本我们在框架底层新增了记录框架运行的所有SQl过程 ...

  8. 通过JavaScript调用SOAP终结点执行实体消息

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复148或者20150813可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 利用OData终结点可以方便的对 ...

  9. linux服务器last查看关机记录

    1.查看重启记录 last reboot命令 [root@test ~]# last reboot reboot system boot -.el6.x Mon May : - : (+:) rebo ...

随机推荐

  1. jackson将json数组转成List、普通数组。

    package com.mkyong; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jacks ...

  2. 剑指offer 65. 不用加减乘除做加法(Leetcode 371. Sum of Two Integers)

    剑指offer 65. 不用加减乘除做加法(Leetcode 371. Sum of Two Integers) https://leetcode.com/problems/sum-of-two-in ...

  3. 【转载】恢复误删文件--DOS命令应用实例(一)

    <电脑爱好者>报转载第一辑第二篇之恢复误删文件--DOS命令应用实例(一)                             恢复误删文件--DOS命令应用实例(一) 上期我们讲述了 ...

  4. TensorFlow.训练_资料(有视频)

    ZC:自己训练 的文章 貌似 能度娘出来很多,得 自己弄过才知道哪些个是坑 哪些个好用...(在CSDN文章的右侧 也有列出很多相关的文章链接)(貌似 度娘的关键字是"TensorFlow ...

  5. TensorFlow.ZC尝试

    1.资料: https://github.com/protocolbuffers/protobuf/releases https://pythonprogramming.net/introductio ...

  6. 最新 搜狐java校招面经 (含整理过的面试题大全)

    从6月到10月,经过4个月努力和坚持,自己有幸拿到了网易雷火.京东.去哪儿.搜狐等10家互联网公司的校招Offer,因为某些自身原因最终选择了搜狐.6.7月主要是做系统复习.项目复盘.LeetCode ...

  7. 【转】MySql 三大知识点——索引、锁、事务

    索引 索引,类似书籍的目录,可以根据目录的某个页码立即找到对应的内容. 索引的优点:1. 天生排序.2. 快速查找. 索引的缺点:1. 占用空间.2. 降低更新表的速度. 注意点:小表使用全表扫描更快 ...

  8. python第二部分

    什么数据类型? int 1, 2, 3 用来运算的 float 1.2 str 用来存储一定的信息"" '' list =[1,2 ,3 "有", 是]用来存储 ...

  9. js延迟2秒执行事件

    有时候,我们在做修改回显数据时,就需要默认触发一些事件,但是由于数据没有很快从服务器中取回,所以就有延迟执行js事件 setTimeout(function () { // 这里就是处理的事件 }, ...

  10. kafka producer serializer序列化(六)

    生产者需要将要发送的数据转换成字节数组才能通过网络发送给kafka,对于一些简单的数据,kafka自带了一些序列化工具, 如:StringSerializer Double Long Integer ...