sql查询job
use msdb
go --if object_id('tempdb..#SqlAgentJob') is not null
-- drop table #SqlAgentJob
--go declare @SqlAgentJob table(
[job_id] uniqueidentifier
,[originating_server] nvarchar(30)
,[name] sysname null
,[enabled] tinyint
,[description] nvarchar(512)
,[start_step_id] int
,[category] sysname null
,[owner] sysname null
,[notify_level_eventlog] int
,[notify_level_email] int
,[notify_level_netsend] int
,[notify_level_page] int
,[notify_email_operator] sysname null
,[notify_netsend_operator] sysname null
,[notify_page_operator] sysname null
,[delete_level] int
,[date_created] datetime
,[date_modified] datetime
,[version_number] int
,[last_run_date] int
,[last_run_time] int
,[last_run_outcome] int
,[next_run_date] int
,[next_run_time] int
,[next_run_schedule_id] int
,[current_execution_status] int
,[current_execution_step] sysname null
,[current_retry_attempt] int
,[has_step] int
,[has_schedule] int
,[has_target] int
,[type] int
) --go INSERT INTO @SqlAgentJob
(
[job_id]
,[originating_server]
,[name]
,[enabled]
,[description]
,[start_step_id]
,[category]
,[owner]
,[notify_level_eventlog]
,[notify_level_email]
,[notify_level_netsend]
,[notify_level_page]
,[notify_email_operator]
,[notify_netsend_operator]
,[notify_page_operator]
,[delete_level]
,[date_created]
,[date_modified]
,[version_number]
,[last_run_date]
,[last_run_time]
,[last_run_outcome]
,[next_run_date]
,[next_run_time]
,[next_run_schedule_id]
,[current_execution_status]
,[current_execution_step]
,[current_retry_attempt]
,[has_step]
,[has_schedule]
,[has_target]
,[Type]
)
EXECUTE sp_help_job --最主要的是研究这个,后面还会继续研究与此相关的几个系统存储过程 在 msdb库中 --select * from @SqlAgentJob select * from @SqlAgentJob where name like '%humana%'
-- and isnull([owner],'')='' and enabled=1
sql查询job的更多相关文章
- SQL常见优化Sql查询性能的方法有哪些?
常见优化Sql查询性能的方法有哪些? 1.查询条件减少使用函数,避免全表扫描 2.减少不必要的表连接 3.有些数据操作的业务逻辑可以放到应用层进行实现 4.可以使用with as 5.使用“临时表”暂 ...
- 记一个简单的sql查询
在我们做各类统计和各类报表的时候,会有各种各样的查询要求.条件 这篇主要记录一个常见的统计查询 要求如下: 统计一段时间内,每天注册人数,如果某天没有人注册则显示为0 现在建个简单的表来试试 建表语句 ...
- Oracle常用SQL查询(2)
三.查看数据库的SQL 1 .查看表空间的名称及大小 select t.tablespace_name, round ( sum (bytes / ( 1024 * 1024 )), 0 ) ts ...
- MySQL GROUP_CONCAT函数使用示例:如何用一个SQL查询出一个班级各个学科第N名是谁?
如何用一个SQL查询出一个班级各个学科第N名是谁? 首先贴出建表语句,方便大家本地测试: -- 建表语句 CREATE TABLE score ( id INT NOT NULL auto_incre ...
- SQL查询第m条到第n条的方法
SQL查询第m条到第n条的方法 如表名为GOOD Sselect top (n-m) * from GOODS where (某一列名) not in (select top m (某一列名) fro ...
- Thinkphp查询 1.查询方式 2.表达式查询 3.快捷查询 4.区间查询 5.组合查询 6.统计查询 7.动态查询 8.SQL 查询
1.使用字符串作为条件查询 $user = M('User'); var_dump($user->where('id=1 AND user="蜡笔小新"')->sele ...
- slick for play 使用原生sql查询以及拼接sql
在play中用函数式框架slick来操作数据库是一件很爽的事情.但有时因为某些特殊场景又不得不用原生的sql了. 还好slick支持这种写法,可以看看slick官方文档,Slick Plain SQL ...
- SQL查询每个表的字段数量
--SQL查询每个表的字段数量select b.[name], count(*) As AllCount,ISNULL(ISNULL(sum(case when isnullable=0 then 1 ...
- SQL查询关于相对路径、矢代、绝对路径、递归、计算列的速度对比跟优化-SOD群记录
1秒查原本递归的查询. 适用于:上下级.多层查询 -- Get childs by parent id WITH Tree AS ( SELECT Id,ParentId FROM dbo.Node ...
- ThinkPHP(3)SQL查询语句
ThinkPHP中对查询语句,包含了基本的查询方式.表达方式.快速查询.区间查询.组合查询.SQL查询.动态查询和子查询. 一.查询方式 ThinkPHP提供了三种基本的查询方式:字符串条件查询.索引 ...
随机推荐
- (文章转载)织梦CMS判断不同的栏目显示不同的图片
{dede:php} $thisid = $refObj->Fields['id']; $row = $dsql->GetOne("Select typeid From `ybs ...
- Kibana 基础入门
原文地址:Kibana 基础入门 博客地址:http://www.extlight.com 一.前言 Kibana 是一个开源的分析和可视化平台,旨在与 Elasticsearch 合作.Kibana ...
- JDBC进行简单的增删改查
一.准备工作(一):MySQL安装配置和基础学习 二.准备工作(二):下载数据库对应的jar包并导入 三.JDBC基本操作 (1)定义记录的类(可选) (2)连接的获取 (3)insert (4)up ...
- jni头文件自动生成
写一个测试代码,大概如下 package aa.bb; public class TestClass { public native void aaaBBB(); } 在项目的src目录下执行 jav ...
- wxWidgets:消息处理流程
首先解释下EventHandler. wxWidgets中EventHandler并不是简单的指消息(事件)处理函数,而是一个用于处理窗口系统消息的类.收到消息后,wxEventHandler会调用e ...
- 术语-软件-软件开发:SDK(软件开发工具包)
ylbtech-术语-软件-软件开发:SDK(软件开发工具包) 软件开发工具包(缩写:SDK.外语全称:Software Development Kit)一般都是一些软件工程师为特定的软件包.软件框架 ...
- [转]NSIS:判断D盘存在与否确定安装路径
转载自:http://www.flighty.cn/html/bushu/20140704_239.html 现在我们想实现这样的功能: 如果目标机器存在D盘,那么就安装程序到D盘,否则安装在系统 ...
- ThinkPHP框架学习摘要
框架在linux与win下区别 1.文件权限设置: 2.大小写不规范: 学习框架的基本思路 : 1.如何收入并配置框架: 2.Controller的命名规范与书写规范: 3.Model的命名规范与书写 ...
- HP-UX oracle RAC 双机实践 (转载)
一.软硬件配置检查 1.检查内存#/usr/contrib/bin/machinfoCPU info: 4 Intel(R) Itanium 2 9100 series processors (1. ...
- 〈Android 群英传-神兵利器〉第7章一个的寂寞与一群人的狂欢
|---第7章一个的寂寞与一群人的狂欢 |---7.1如何解决问题 |---Chrome浏览器 |---Chrome开发者工具 |---Chrome插件(Json-Handle:Json格式化查看工具 ...