请问这四个视图有什么区别?
all_jobs
user_jobs
dba_jobs
dba_jobs_running
1.这四张视图的区别(包含与被包换的关系)。
2.我用isubmit创建了一个job,参数用的是sysdate,这样是不是就开始运行了呢,还是必须run才可以?
3.如何停止而不是删除一个job,broken指什么?
4.我isubmit了一个job,并且run了,在前三张视图里都能查到,但dba_jobs_running里面“select job from dba_jobs_running;”结果是“未选定行”。我看了job里面执行的过程相应的功能确实已经在做了为什么这个视图里依然没有显示呢?
问题比较多,麻烦大家了,谢谢。

解决方案 »

  1.   

    1. 1. DBA_ : shows all present in the database.
       2. ALL_ : shows all  of the user(created by himself) and otherS which are granted by the DBA.
       3. USER_ : shows all created by the user only.
       4.DBA_JOBS_RUNNING lists all jobs that are currently running in the instance.IN ALL,RELATIONSHIP:
    USER_JOB<=ALL_JOB<=DBA_JOB2.When you force a job to run using the procedure DBMS_JOB.RUN, the job is run by your user process and with your default privileges only.
    3.
    You can terminate a running job by ing the job as broken, identifying the session running the job, and disconnecting that session. You should  the job as broken, so that Oracle does not attempt to run the job again.There are two ways a job can break:    * Oracle has failed to successfully execute the job after 16 attempts.
        * You have ed the job as broken, using the procedure DBMS_JOB.BROKEN:
    BEGIN
    DBMS_JOB.BROKEN(14144, TRUE);
    END;
    /
    Once a job has been ed as broken, Oracle will not attempt to execute the job until you either  the job as not broken, or force the job to be executed by calling the procedure DBMS_JOB.RUN.4.UNKNOW
      

  2.   

    谢谢1楼,您回答得很仔细。3个问题:
    ALL_ : shows all  of the user(created by himself) and otherS which are granted by the DBA.
    USER_ : shows all created by the user only. 
    你意思是说不是USER_只是当前用户的job;ALL_是所有用户的job(包含管理员sysdba用户么?);我用isubmit创建了job之后如果不run,是否已经在执行?“the job is run by your user process and with your default privileges only. ”这里的user process和default privileges分别是什么?感谢你的回答^^
      

  3.   

    回楼上:马马乎乎拉。
    USER_只是当前用户创建的job;
    ALL_是当前用户创建的job+dba 授予给这个用户的。