| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> oracle >> Oracle DBMS_JOB: mei ge te ding shi jian zhi xing te ding ren wu
 

Oracle DBMS_JOB: mei ge te ding shi jian zhi xing te ding ren wu

2008-08-06 07:16:29 编辑來源:互联网 评论
 
本文为【Oracle DBMS_JOB:每隔特定时间执行特定任务】的拼音翻译版
  Oracle JOB:
  yi 、 she zhi chu shi hua shen shu job_queue_processes
  sql> alter system set job_queue_processes=n;(n>0)
  job_queue_processes zui da zhi wei 1000
  cha kan job queue hou tai jin cheng
  sql>select name,description from v$bgprocess;
  er 、dbms_job package yong fa jie shao
  bao han yi xia zi guo cheng :
  Broken() guo cheng 。
  change() guo cheng 。
  Interval() guo cheng 。
  Isubmit() guo cheng 。
  Next_Date() guo cheng 。
  Remove() guo cheng 。
  Run() guo cheng 。
  Submit() guo cheng 。
  User_Export() guo cheng 。
  What() guo cheng 。
  1、Broken() guo cheng geng xin yi ge yi ti jiao de gong zuo de zhuang tai , dian xing di shi yong lai ba yi ge yi po gong zuo biao ji wei wei po gong zuo
  zhe ge guo cheng you san ge shen shu :job 、broken yu next_date。
  PROCEDURE Broken ( job IN binary_integer,
  BrokenIN boolean,
  next_date IN date :=SYSDATE)
  job shen shu shi gong zuo hao , ta zai wen ti zhong wei yi biao shi gong zuo 。
  broken shen shu zhi shi ci gong zuo shi fou jiang biao ji wei po ——TRUE shuo ming ci gong zuo jiang biao ji wei po , er FLASE shuo ming ci gong zuo jiang biao ji wei wei po 。
  next_date shen shu zhi shi zai shen me shi hou ci gong zuo jiang zai ci yun xing 。 ci shen shu que sheng zhi wei dang qian ri qi he shi jian 。
  job ru guo you yu mou zhong yuan yin wei neng cheng gong zhi xing ,oracle jiang chong shi 16 ci hou , huan wei neng cheng gong zhi xing , jiang bei biao ji wei broken chong xin qi dong zhuang tai wei broken de job, you ru xia liang zhong fang shi ;
  a、 li yong dbms_job.run() li ji zhi xing gai job
  sql>begin
  sql>dbms_job.run(:jobno) gai jobno wei submit guo cheng ti jiao shi fan hui de job number
  sql>end;
  sql>/
  b、 li yong dbms_job.broken() chong xin jiang broken biao ji wei false
  sql>begin
  sql>dbms_job.broken (:job,false,next_date)
  sql>end;
  sql>/
  2、Change() guo cheng yong lai gai bian zhi ding gong zuo de she zhi 。
  zhe ge guo cheng you si ge shen shu :job、what 、next_date yu interval。
  PROCEDURE Change ( job IN binary_integer,
  What IN varchar2,
  next_date IN date,
  interval IN varchar2)
  ci job shen shu shi yi ge zheng shu zhi , ta wei yi biao shi ci gong zuo 。
  What shen shu shi you ci gong zuo yun xing de yi kuai PL/SQL dai ma kuai 。
  next_date shen shu zhi shi he shi ci gong zuo jiang bei zhi xing 。
  interval shen shu zhi shi yi ge gong zuo chong zhi xing de pin du 。
  3、Interval() guo cheng yong lai xian shi di she zhi chong zhi xing yi ge gong zuo zhi jian de shi jian jian ge shu 。 zhe ge guo cheng you liang ge shen shu :job yu interval
  PROCEDURE Interval ( jobIN binary_integer,
  Interval IN varchar2)
  job shen shu biao shi yi ge te ding de gong zuo 。interval shen shu zhi shi yi ge gong zuo chong zhi xing de pin du 。
  4、ISubmit() guo cheng yong lai yong te ding de gong zuo hao ti jiao yi ge gong zuo 。 zhe ge guo cheng you wu ge shen shu :job、what、next_date、interval yu no_parse
  PROCEDURE ISubmit ( job IN binary_ineger,
  WhatIN varchar2,
  next_date IN date,
  interval IN varchar2,
  no_parseIN booean:=FALSE)
  zhe ge guo cheng yu Submit() guo cheng de wei yi qu bie zai yu ci job shen shu zuo wei IN xing shen shu chuan di qie bao kuo yi ge you kai fa zhe ti gong de gong zuo hao 。 ru guo ti gong de gong zuo hao yi bei shi yong , jiang chan sheng yi ge cuo wu 。
  5、Next_Date() guo cheng yong lai xian shi di she ding yi ge gong zuo de zhi xing shi jian 。 zhe ge guo cheng jie shou liang ge shen shu :job yu next_date
  PROCEDURE Next_Date( job IN binary_ineger,
  next_date IN date)
  job biao shi yi ge yi cun zai de gong zuo 。next_date shen shu zhi shi le ci gong zuo ying bei zhi xing de ri qi yu shi jian 。
  6、Remove() guo cheng lai shan chu yi ge yi ji hua yun xing de gong zuo 。 zhe ge guo cheng jie shou yi ge shen shu :
  PROCEDURE Remove(job INbinary_ineger);
  job shen shu wei yi di biao shi yi ge gong zuo 。 zhe ge shen shu de zhi shi you wei ci gong zuo tiao yong Submit() guo cheng fan hui de job shen shu de zhi 。 yi zheng zai yun xing de gong zuo bu neng you tiao yong guo cheng xu shan chu 。
  7、Run() guo cheng yong lai li ji zhi xing yi ge zhi ding de gong zuo 。 zhe ge guo cheng zhi jie shou yi ge shen shu :
  PROCEDURE Run(job IN binary_ineger)
  job shen shu biao shi jiang bei li ji zhi xing de gong zuo 。
  8、 shi yong Submit() guo cheng , gong zuo bei zheng chang di ji hua hao
  zhe ge guo cheng you wu ge shen shu :job、what、next_date、interval yu no_parse。
  PROCEDURE Submit ( job OUT binary_ineger,
  WhatINvarchar2,
  next_date INdate,
  interval INvarchar2,
  no_parseINbooean:=FALSE)
  job shen shu shi you Submit() guo cheng fan hui de binary_ineger。 zhe ge zhi yong lai wei yi biao shi yi ge gong zuo 。
  what shen shu shi jiang bei zhi xing de PL/SQL dai ma kuai 。
  next_date shen shu zhi shi he shi jiang yun xing zhe ge gong zuo 。
  interval shen shu he shi zhe ge gong zuo jiang bei chong zhi xing 。
  no_parse shen shu zhi shi ci gong zuo zai ti jiao shi huo zhi xing shi shi fou ying jin xing yu fa fen xi ——TRUE zhi shi ci PL/SQL dai ma zai ta di yi ci zhi xing shi ying jin xing yu fa fen xi , er FALSE zhi shi ben PL/SQL dai ma ying li ji jin xing yu fa fen xi 。
  9、User_Export() guo cheng fan hui yi ge ming ling , ci ming ling yong lai an pai yi ge cun zai de gong zuo yi bian ci gong zuo neng chong xin ti jiao
  ci cheng xu you liang ge shen shu :job yu my_call。
  PROCEDURE User_Export( job IN binary_ineger,
  my_callIN OUT varchar2)
  job shen shu biao shi yi ge an pai le de gong zuo 。my_call shen shu bao han zai ta de dang qian zhuang tai chong xin ti jiao ci gong zuo suo xu yao de zheng wen 。
  10、What() guo cheng ying xu zai gong zuo zhi xing shi chong xin she zhi ci zheng zai yun xing de ming ling 。 zhe ge guo cheng jie shou liang ge shen shu :job yu what
  PROCEDURE What ( job IN binary_ineger,
  What IN OUT varchar2)
  job shen shu biao shi yi ge cun zai de gong zuo 。what shen shu zhi shi jiang bei zhi xing de xin de PL/SQL dai ma 。
  san 、 cha kan xiang guan job xin xi
  1、 xiang guan shi tu
  dba_jobs
  all_jobs
  user_jobs
  dba_jobs_running bao han zheng zai yun xing job xiang guan xin xi
  2、 cha kan xiang guan xin xi
  SQL>SELECT JOB, NEXT_DATE, NEXT_SEC, FAILURES, BROKEN FROM DBA_JOBS;
  zheng zai yun xing de JOB xiang guan xin xi
  SELECT SID, r.JOB, LOG_USER, r.THIS_DATE, r.THIS_SEC
  FROM DBA_JOBS_RUNNING r, DBA_JOBS j
  WHERE r.JOB = j.JOB;
  JOB QUEUE LOCK xiang guan xin xi
  SELECT SID, TYPE, ID1, ID2 FROM V$LOCK WHERE TYPE = 'JQ';
  si 、 jian dan li zi
  yi ge jian dan li zi :
  chuang jian ce shi biao
  SQL> create table TEST(a date);
  biao yi chuang jian 。
  chuang jian yi ge zi ding yi guo cheng
  SQL> create or replace procedure MYPROC as
  2begin
  3insert into TEST values(sysdate);
  4end;
  5/
  guo cheng yi chuang jian 。
  chuang jian JOB
  SQL> variable job1 number;
  SQL>
  SQL> begin
  2dbms_job.submit(:job1,'MYPROC;',sysdate,'sysdate+1/1440');-- mei tian 1440 fen zhong , ji yi fen zhong yun xing test guo cheng yi ci
  3end;
  4/
  PL/SQL guo cheng yi cheng gong wan cheng 。
  yun xing JOB
  SQL> begin
  2dbms_job.run(:job1);
  3end;
  4/
  PL/SQL guo cheng yi cheng gong wan cheng 。
  SQL> select to_char(a,'yyyy/mm/dd hh24:mi:ss') shi jian from TEST;
  shi jian
  -------------------
  2001/01/07 23:51:21
  2001/01/07 23:52:22
  2001/01/07 23:53:24
  shan chu JOB
  SQL> begin
  2dbms_job.remove(:job1);
  3end;
  4/
  PL/SQL guo cheng yi cheng gong wan cheng 。【原文】【汉音对照
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
Oracle JOB: yi 、 she zhi chu shi hua shen shu job_queue_processes sql> alter system set job_queue_processes=n;(n>0) job_queue_processes zui da zhi wei 1000   cha kan job queue hou tai jin cheng sql>select name,description from v$bgprocess;   er 、dbms_job package yong fa jie shao bao han yi xia zi guo cheng :    Broken() guo cheng 。 change() guo cheng 。 Interval() guo cheng 。 Isubmit() guo cheng 。 Next_Date() guo cheng 。 Remove() guo cheng 。 Run() guo cheng 。 Submit() guo cheng 。 User_Export() guo cheng 。 What() guo cheng 。   1、Broken() guo cheng geng xin yi ge yi ti jiao de gong zuo de zhuang tai , dian xing di shi yong lai ba yi ge yi po gong zuo biao ji wei wei po gong zuo zhe ge guo cheng you san ge shen shu :job 、broken yu next_date。   PROCEDURE Broken ( job  IN binary_integer, Broken  IN boolean, next_date IN date :=SYSDATE)   job shen shu shi gong zuo hao , ta zai wen ti zhong wei yi biao shi gong zuo 。 broken shen shu zhi shi ci gong zuo shi fou jiang biao ji wei po ——TRUE shuo ming ci gong zuo jiang biao ji wei po , er FLASE shuo ming ci gong zuo jiang biao ji wei wei po 。 next_date shen shu zhi shi zai shen me shi hou ci gong zuo jiang zai ci yun xing 。 ci shen shu que sheng zhi wei dang qian ri qi he shi jian 。 job ru guo you yu mou zhong yuan yin wei neng cheng gong zhi xing ,oracle jiang chong shi 16 ci hou , huan wei neng cheng gong zhi xing , jiang bei biao ji wei broken chong xin qi dong zhuang tai wei broken de job, you ru xia liang zhong fang shi ; a、 li yong dbms_job.run() li ji zhi xing gai job sql>begin sql>dbms_job.run(:jobno) gai jobno wei submit guo cheng ti jiao shi fan hui de job number sql>end; sql>/ b、 li yong dbms_job.broken() chong xin jiang broken biao ji wei false sql>begin sql>dbms_job.broken (:job,false,next_date) sql>end; sql>/ 2、Change() guo cheng yong lai gai bian zhi ding gong zuo de she zhi 。 zhe ge guo cheng you si ge shen shu :job、what 、next_date yu interval。   PROCEDURE Change ( job     IN binary_integer, What    IN varchar2, next_date  IN date, interval  IN varchar2)   ci job shen shu shi yi ge zheng shu zhi , ta wei yi biao shi ci gong zuo 。 What shen shu shi you ci gong zuo yun xing de yi kuai PL/SQL dai ma kuai 。 next_date shen shu zhi shi he shi ci gong zuo jiang bei zhi xing 。 interval shen shu zhi shi yi ge gong zuo chong zhi xing de pin du 。   3、Interval() guo cheng yong lai xian shi di she zhi chong zhi xing yi ge gong zuo zhi jian de shi jian jian ge shu 。 zhe ge guo cheng you liang ge shen shu :job yu interval   PROCEDURE Interval ( job   IN binary_integer, Interval IN varchar2)   job shen shu biao shi yi ge te ding de gong zuo 。interval shen shu zhi shi yi ge gong zuo chong zhi xing de pin du 。   4、ISubmit() guo cheng yong lai yong te ding de gong zuo hao ti jiao yi ge gong zuo 。 zhe ge guo cheng you wu ge shen shu :job、what、next_date、interval yu no_parse   PROCEDURE ISubmit ( job    IN binary_ineger, What   IN varchar2, next_date IN date, interval  IN varchar2, no_parse IN booean:=FALSE)   zhe ge guo cheng yu Submit() guo cheng de wei yi qu bie zai yu ci job shen shu zuo wei IN xing shen shu chuan di qie bao kuo yi ge you kai fa zhe ti gong de gong zuo hao 。 ru guo ti gong de gong zuo hao yi bei shi yong , jiang chan sheng yi ge cuo wu 。   5、Next_Date() guo cheng yong lai xian shi di she ding yi ge gong zuo de zhi xing shi jian 。 zhe ge guo cheng jie shou liang ge shen shu :job yu next_date   PROCEDURE Next_Date( job     IN binary_ineger, next_date  IN date) job biao shi yi ge yi cun zai de gong zuo 。next_date shen shu zhi shi le ci gong zuo ying bei zhi xing de ri qi yu shi jian 。   6、Remove() guo cheng lai shan chu yi ge yi ji hua yun xing de gong zuo 。 zhe ge guo cheng jie shou yi ge shen shu :   PROCEDURE Remove(job IN binary_ineger);   job shen shu wei yi di biao shi yi ge gong zuo 。 zhe ge shen shu de zhi shi you wei ci gong zuo tiao yong Submit() guo cheng fan hui de job shen shu de zhi 。 yi zheng zai yun xing de gong zuo bu neng you tiao yong guo cheng xu shan chu 。   7、Run() guo cheng yong lai li ji zhi xing yi ge zhi ding de gong zuo 。 zhe ge guo cheng zhi jie shou yi ge shen shu : PROCEDURE Run(job IN binary_ineger)    job shen shu biao shi jiang bei li ji zhi xing de gong zuo 。   8、 shi yong Submit() guo cheng , gong zuo bei zheng chang di ji hua hao zhe ge guo cheng you wu ge shen shu :job、what、next_date、interval yu no_parse。   PROCEDURE Submit ( job    OUT binary_ineger, What   IN varchar2, next_date IN date, interval  IN varchar2, no_parse IN booean:=FALSE)   job shen shu shi you Submit() guo cheng fan hui de binary_ineger。 zhe ge zhi yong lai wei yi biao shi yi ge gong zuo 。 what shen shu shi jiang bei zhi xing de PL/SQL dai ma kuai 。 next_date shen shu zhi shi he shi jiang yun xing zhe ge gong zuo 。 interval shen shu he shi zhe ge gong zuo jiang bei chong zhi xing 。 no_parse shen shu zhi shi ci gong zuo zai ti jiao shi huo zhi xing shi shi fou ying jin xing yu fa fen xi ——TRUE zhi shi ci PL/SQL dai ma zai ta di yi ci zhi xing shi ying jin xing yu fa fen xi , er FALSE zhi shi ben PL/SQL dai ma ying li ji jin xing yu fa fen xi 。   9、User_Export() guo cheng fan hui yi ge ming ling , ci ming ling yong lai an pai yi ge cun zai de gong zuo yi bian ci gong zuo neng chong xin ti jiao ci cheng xu you liang ge shen shu :job yu my_call。   PROCEDURE User_Export( job    IN binary_ineger, my_call  IN OUT varchar2)   job shen shu biao shi yi ge an pai le de gong zuo 。my_call shen shu bao han zai ta de dang qian zhuang tai chong xin ti jiao ci gong zuo suo xu yao de zheng wen 。  10、What() guo cheng ying xu zai gong zuo zhi xing shi chong xin she zhi ci zheng zai yun xing de ming ling 。 zhe ge guo cheng jie shou liang ge shen shu :job yu what   PROCEDURE What ( job  IN binary_ineger, What IN OUT varchar2) job shen shu biao shi yi ge cun zai de gong zuo 。what shen shu zhi shi jiang bei zhi xing de xin de PL/SQL dai ma 。   san 、 cha kan xiang guan job xin xi 1、 xiang guan shi tu dba_jobs all_jobs user_jobs dba_jobs_running bao han zheng zai yun xing job xiang guan xin xi    2、 cha kan xiang guan xin xi    SQL>SELECT JOB, NEXT_DATE, NEXT_SEC, FAILURES, BROKEN FROM DBA_JOBS;   zheng zai yun xing de JOB xiang guan xin xi    SELECT SID, r.JOB, LOG_USER, r.THIS_DATE, r.THIS_SEC FROM DBA_JOBS_RUNNING r, DBA_JOBS j WHERE r.JOB = j.JOB;   JOB QUEUE LOCK xiang guan xin xi    SELECT SID, TYPE, ID1, ID2 FROM V$LOCK WHERE TYPE = 'JQ'; si 、 jian dan li zi yi ge jian dan li zi :    chuang jian ce shi biao SQL> create table TEST(a date);   biao yi chuang jian 。   chuang jian yi ge zi ding yi guo cheng SQL> create or replace procedure MYPROC as 2 begin 3 insert into TEST values(sysdate); 4 end; 5 /   guo cheng yi chuang jian 。   chuang jian JOB SQL> variable job1 number; SQL> SQL> begin 2 dbms_job.submit(:job1,'MYPROC;',sysdate,'sysdate+1/1440');  -- mei tian 1440 fen zhong , ji yi fen zhong yun xing test guo cheng yi ci 3 end; 4 /   PL/SQL guo cheng yi cheng gong wan cheng 。   yun xing JOB SQL> begin 2 dbms_job.run(:job1); 3 end; 4 /   PL/SQL guo cheng yi cheng gong wan cheng 。   SQL> select to_char(a,'yyyy/mm/dd hh24:mi:ss') shi jian from TEST;   shi jian ------------------- 2001/01/07 23:51:21 2001/01/07 23:52:22 2001/01/07 23:53:24   shan chu JOB SQL> begin 2 dbms_job.remove(:job1); 3 end; 4 /   PL/SQL guo cheng yi cheng gong wan cheng 。
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
温柔美女韩雪写真
杨幂全新写真
网易红人PLMM草梅队长
河智苑Compagna09春装
看 这就是我的学校
惠山古迹区
雪后看花仙
元宵烟火
 
>>返回首页<<
 为你推荐
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
©2005- 王朝网络 版权所有