select top 100 js.last_run_date ,j.name, js.step_id,js.step_name,js.last_run_date,jsl.log,jh.message from msdb.dbo.sysjobhistory jh
join msdb.dbo.sysjobs j on j.job_id = jh.job_id
join msdb.dbo.sysjobsteps js on js.job_id = jh.job_id
join msdb.dbo.sysjobstepslogs jsl on jsl.step_uid = js.step_uid
where jh.run_status in (0) -- 0 Failed, 1 successful, 2 retry, 3 Canceled, 4 In-progress, 5 unknow
and last_run_date>=CONVERT(varchar(100),dateadd(d,-3, GETDATE()), 112)
order by js.last_run_date desc,j.name,js.step_id

SQL query - check latest 3 days failed job.的更多相关文章

  1. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manu

    这个是sql 语句 错误     仔细检查 SQL语句是否写错了 org.apache.ibatis.exceptions.PersistenceException: ### Error queryi ...

  2. kentico中提示Message: An invalid SQL query was used.

    在调用CMSAbstractWebPart类的GetValue方法的时候出错. namespace CMS.PortalEngine.Web.UI{ /// <summary> /// B ...

  3. Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My

    转自:https://blog.csdn.net/haha_66666/article/details/78444457 Query : select * from order LIMIT 0, 10 ...

  4. jstl中的sql:query标签获取的结果如何格式化输出

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  5. .net连接DB2的异常SQL0666 - SQL query exceeds specified time limit or storage limit.错误处理

    SQL0666 - SQL query exceeds specified time limit or storage limit. 原因:查询超时 解决办法: set the DbCommand.C ...

  6. ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 7

    问题: 使用hibernate4.1.1,数据库使用mysql5.1.30,使用hibernate自动生成数据库表时,hibernate方言使用org.hibernate.dialect.MySQLI ...

  7. C# Mysql You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ????

    有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...

  8. NHibernate系列文章二十六:NHibernate查询之SQL Query查询(附程序下载)

    摘要 NHibernate在很早的版本就提供了SQL Query(原生SQL查询),对于很复杂的查询,如果使用其他的查询方式实现比较困难的时候,一般使用SQL Query.使用SQL Query是基于 ...

  9. MySql 执行语句错误 Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

    关于用Power Designer 生成sql文件出现 错误  [Err] 1064 - You have an error in your SQL syntax; check the manual ...

随机推荐

  1. Maven之基本概念及特性的基本介绍

    maven最主要的概念是坐标和依赖,这是maven可以极大简化构建过程以及进行项目管理的基础. 坐标 类似于地理位置的坐标,maven的坐标也是用来标记的,不同是它是来标记maven中的不同组件,也就 ...

  2. u-boot 编译,启动流程分析,移植

    分析u-boot-1.1.6 的启动流程 移植u-boot 2012.04版本到JZ2440开发板 源码百度云链接:https://pan.baidu.com/s/10VnxfDWBqJVGY3SCY ...

  3. lsof 命令

    [root@localhost ~]# lsof COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init root cwd DIR , / in ...

  4. 运维自动化ansible基础

    云计算三种服务架构 IAAS: 不提供OS  只购买硬件(网络,存储,计算) PAAS: 提供硬件和OS和开发和运行环境  只需要开发应用软件 SAAS: 提供 硬件 os 软件   相当于直接购买软 ...

  5. ssh工具自动化命令

    SCP命令 scp [options] SRC... DEST/ 两种方式: scp [options] [user@]host:/sourcefile  /destpath scp [options ...

  6. 右键菜单添加git选项

    1.jpg   2.jpg   3.jpg   4.jpg   5.jpg   6.jpg   7.jpg

  7. 装系统w7、ubuntu、centos等系统(一)

    装w7系统准备 1.从老毛桃u盘启动盘制作工具_老毛桃u盘装系统_老毛桃pe_老毛桃官网下载装机版 2.一个正常使用的U盘,但容量大于4G,并且插入电脑保持连接 3.老毛桃装机版选择U盘启动-> ...

  8. Number (int float bool complex)--》int 整型、二进制整型、八进制整型、十六进制整型

    # ### Number (int float bool complex) # (1) int 整型 (正整数 0 负整数) intvar = 15 print(intvar) intvar = 0 ...

  9. Centos7下ups监控apcupsd的使用

    什么是UPS UPS-Uninterrupted Power System:利用电池化学能作为后备能量,在市电断电等电网故障时,不间断地为用户设备提供(交流)电能的一种能量转换装置. UPS的主要功能 ...

  10. 转发(forward)和重定向(redirect)

    转发和重定向 参考:http://www.2cto.com/kf/201107/97118.html 以前写的一个注册页面: package com.ifly.bbs.controller; impo ...