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. 可变数组(PLSQL)

    可变数组 可变数组与嵌套表相似,也是一种集合.一个可变数组是对象的一个集合,其中每个对象都具有相同的数据类型.可变数组的大小由创建时决定.在表中建立可变数组后,可变数组在主表中作为一个列对待.从概念上 ...

  2. vue指令v-html中使用过滤器filters功能

    Vue 2.0 不再支持在 v-html 中使用过滤器 解决方法: 1:全局方法(推荐) 2:computed 属性 3:$options.filters(推荐) 1:使用全局方法: 可以在 Vue ...

  3. windows安装nginx并存放静态资源

    1.将nginx-windows.zip下载下来,然后点击nginx.exe 如果一闪而过并且打开网页输入localhost显示无法访问,打开error.log文件:No mapping for th ...

  4. mysql数据库数据(字段数过大)太多导入不了的解决方法

    mysql数据库数据(字段数过大)太多导入不了的决方法: 1.打开navicat 工具 2.在数据库上右键,执行右键菜单命令“命令列界面” 3.在打开的窗口中,运行set global max_all ...

  5. Pycharm快捷键大全(windows + Mac)

    Windows快捷键 1.编辑 Ctrl + Space    基本的代码完成(类.方法.属性) Ctrl + Alt + Space  快速导入任意类 Ctrl + Shift + Enter    ...

  6. RzCheckTree基本使用

    procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin //循环读取勾选节点代码及内容 //StateIndex 1 ...

  7. cxf简单例子

    cxf 这里介绍在web跟非web中的发布以及调用 准备条件: 1,导入cxf的相关jar包,以maven项目为例 pom的配置文件为 <project xmlns="http://m ...

  8. 常用笔记:Linux

    Linux打包压缩排除指定文件夹: 使用Linux的tar 命令打包压缩文件夹,有时候需要排除里面的某几个文件夹,加上--exclude参数: tar -zcvf blog.tar.gz --excl ...

  9. GitHub上个最有意思的项目合集(技术清单系列)

    没有1K以上的星星都不好意思推荐给大家!林子大了,啥项目都有,这里给大家搜罗了10个Github上有趣的项目.如果你就着辣椒食用本文,一定会激动的流下泪来...... 1.一行代码没有 | 18k s ...

  10. centos 打包报错Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

    参考: https://blog.csdn.net/salonzhou/article/details/8990237https://stackoverflow.com/questions/23358 ...