DBA常用脚本
2008-01-09 00:55
232 查看
很高兴在新年伊始,有机会能参加IT评选活动,先为自己拉拉票~投我的,没错的~
就象自己常说的那句:在SQL中只有想不到的,没有做不到的.别扔砖头啊~哪个扔的
下面就放出一些自己写的常用的脚本,希望给大家的工作带来帮助.
有问题的话可以联系我~顺便给大家拜个早年:祝2008年大家能身体健康,合家安泰~
谢谢大家的鼓励.
在SQL2000中禁用的作业大家尽量不要启用了~因为下面脚本enable设置为1了~
-----------检查作业的脚本------
------------kerryyu-----------------
create procedure day_job_check
as
select distinct a.name as '作业 名称',
case --会员等级 对应 tbl_infotype 和 tbl_subinfotype
when b.last_run_outcome = 0 then '失败'
when b.last_run_outcome = 2 then '取消'
else
'其他'
end as '作业 次运行 结果',
a.description as '对作业 描述',
b.last_outcome_message as '消息', b.last_run_date
as ' 次运行作业 日期', FLOOR(b.last_run_time / 3/600) as '小时',
FLOOR((b.last_run_time - FLOOR(b.last_run_time / 3600) * 3600) / 60) as '分钟', (b.last_run_duration/60) as '作业运行 持续时间--分钟'
from msdb.dbo.sysjobs a, msdb.dbo.sysjobservers b where b.job_id = a.job_id and a.enabled = 1
and floor(b.last_run_time/60)>600
会定时更新脚本,大家有空来看的时候帮顶一下,谢谢拉本文出自 “鸟蛋屋” 博客,请务必保留此出处http://kerryyu.blog.51cto.com/176058/58502
就象自己常说的那句:在SQL中只有想不到的,没有做不到的.别扔砖头啊~哪个扔的
下面就放出一些自己写的常用的脚本,希望给大家的工作带来帮助.
有问题的话可以联系我~顺便给大家拜个早年:祝2008年大家能身体健康,合家安泰~
谢谢大家的鼓励.
在SQL2000中禁用的作业大家尽量不要启用了~因为下面脚本enable设置为1了~
-----------检查作业的脚本------
------------kerryyu-----------------
create procedure day_job_check
as
select distinct a.name as '作业 名称',
case --会员等级 对应 tbl_infotype 和 tbl_subinfotype
when b.last_run_outcome = 0 then '失败'
when b.last_run_outcome = 2 then '取消'
else
'其他'
end as '作业 次运行 结果',
a.description as '对作业 描述',
b.last_outcome_message as '消息', b.last_run_date
as ' 次运行作业 日期', FLOOR(b.last_run_time / 3/600) as '小时',
FLOOR((b.last_run_time - FLOOR(b.last_run_time / 3600) * 3600) / 60) as '分钟', (b.last_run_duration/60) as '作业运行 持续时间--分钟'
from msdb.dbo.sysjobs a, msdb.dbo.sysjobservers b where b.job_id = a.job_id and a.enabled = 1
and floor(b.last_run_time/60)>600
会定时更新脚本,大家有空来看的时候帮顶一下,谢谢拉本文出自 “鸟蛋屋” 博客,请务必保留此出处http://kerryyu.blog.51cto.com/176058/58502
相关文章推荐
- Oracle OCP笔记(33)DBA查看系统常用脚本
- [Oracle] DBA 常用脚本一
- DBA常用脚本,隆重推荐!
- 8个DBA最常用的监控Oracle数据库的常用shell脚本
- DBA常用脚本
- DBA常用脚本(转:http://www.matrix.org.cn/thread.shtml?topicId=31490&forumId=36)
- DBA常用脚本3
- DBA常用的脚本---三-ORACLE常用技巧和脚本
- dba常用脚本
- oracle DBA 常用监控脚本
- 常用DBA脚本
- ORACLE DBA常用SQL脚本工具->管理篇(1)
- oracle DBA 常用监控脚本
- 8个DBA最常用的监控Oracle数据库的常用shell脚本
- 8个DBA最常用的监控Oracle数据库的常用shell脚本
- DBA常用脚本
- 常用DBA脚本
- 8个DBA最常用的监控Oracle数据库的常用shell脚本
- script:dba 常用管理脚本收集
- [Oracle] DBA 常用脚本二