Oracle job 管理
SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000 ;job_queue_interval = 10 //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user
1 select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from dba_jobs where job in (1,3);
查询job的情况。
show paramter background_dump_dest.
看alter.log 和trace
SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000
job_queue_interval = 10 //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user
1 select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from dba_jobs where job in (1,3);
查询job的情况。
show paramter background_dump_dest.
看alter.log 和trace
请问我如何停止一个JOB
SQL> exec dbms_job.broken(1,true)
PL/SQL 过程已成功完成。
SQL>commit //必须提交否则无效
启动作业
SQL> exec dbms_job.broken(1,false)
PL/SQL 过程已成功完成。
停其他用户的job
SQL>exec sys.dbms_ijob.broken(98,true);
SQL>commit;
============================
exec dbms_job.broken(:job) 停止
exec dbms_job.broken(186,true) //标记位broken
exec dbms_job.broken(186,false)//标记为非broken
exec dbms_job.broken(186,false,next_day(sysdate,'monday')) //标记为非broken,指定执行时间
exec dbms_job.remove(:job);删除
exec dbms_job.remove(186);
commit;
把一个broken job重新运行
三、查看相关job信息
1、相关视图
dba_jobs
all_jobs
user_jobs
dba_jobs_running 包含正在运行job相关信息
创建JOB
variable j
相关文档:
[root@vmfs sysconfig]# lvdisplay |grep db_d
LV Name /dev/db_v4/db_d_22
LV Name /dev/db_v4 ......
新安装了一台数据库服务器,版本是10.2.0.1的,因为现在最新的是10.2.0.4的。 版本低了,bug多。所以就对数据库做了一个升级。
服务器是windows 2003的系统,都是可视话操作。 下一步的问题。 10.2.0.4的patchset 里面也有详细的安装说明。 之做个总结 ......
SQL Server开发者Oracle快速入门 http://kb.cnblogs.com/a/853694 简单概念的介绍 1. 连接数据库
S: use mydatabase
O: connect username/password@DBAlias
conn username/password@DBAlias 2. 在Oracle中使用Dual, Dual是O ......
今天同事raise一个小问题,怎么在ALL_VIEWS数据字典text字段查找lrf字符串:
etl@DWTEST> select owner,view_name from all_views where instr(text,'lrf') > 0;
select owner,view_name from all_views where instr(text,'lrf') > 0
  ......
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'syn_rpt_members_relation;'
,next_date => to_date('02-07-2008 01:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'trunc(sysdate)+1+1/24'
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_cha ......