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提供了三种基本的查询方式:字符串条件查询.索引 ...
随机推荐
- javascript 变量定义
一.javascript中,变量定义的位置与写在哪个<script></script>标签对内无关,只分前后顺序,写在前面的后面就能够访问,写在后面的前面会提示“未定义”. 例 ...
- Linux(Centos7)下安装 zookeeper docker版 集群
为了省去麻烦的软件安装,现在开发环境需要的软件越来越习惯于docker安装了,先看下安装后的截图,开发环境正在启动的容器 1.首先系统需要先支持docker …… 由于之前安装几次都没有做流程记录,在 ...
- ask 调用时间标签
织梦时间调用标签大全(2012-08-03 12:50:13) 转载▼ 分类: 织梦 织梦首页时间标签1,11-20 样式([field:pubdate function='strftime(& ...
- python3 urllib
1.获取页面内容 第一种方式: import urllib.request url = 'https://www.baidu.com/' r = urllib.request.urlopen(url) ...
- Django ORM基本的单表增删改查
创建表 步骤: 1.app下models.py里创建类(继承models.Model) from django.db import models class UserInfo(models.Model ...
- 【Spring-AOP-学习笔记-3】@Before前向增强处理简单示例
项目结构 程序代码 HelloImpl.java WorldImpl.java 定义切面类 package org.crazyit.app.aspect; import org.aspectj.lan ...
- QSqlDatabase: QMYSQL driver not loaded
转载:KiteRunner24 在Qt 5.9中使用数据库连接时,弹出下面的错误: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: avail ...
- RabbitMQ-1 Helloword
参考:http://rabbitmq.mr-ping.com/ 介绍 RabbitMQ是一个消息代理.它的工作就是接收和转发消息.你可以把它想像成一个邮局:你把信件放入邮箱,邮递员就会把信件投递到你的 ...
- python selenium-5根据unittest组织测试用例
driver:浏览器driver存放地址 testcase:测试用例目录 report:测试结果保存目录 runtest.py:执行文件 test_search1.py搜索selenium,test_ ...
- 利用python,简单的词语纠错
利用python,编写一个简单的词语纠正修改器. 原文:http://norvig.com/spell-correct.html #!/usr/bin/env python # coding=utf- ...