Using DBMS_JOB

Is there a way to schedule to run an SQL script with DBMS_JOB. All I can see in the documentation is to schedule a PL/SQL procedure.
If not, do you know any other built in Oracle utility that can do this.
Thanks

This is a brief example about how you can work with java:
public class MyClass2 {
public static String Concat(String inString1, String inString2) {
System.out.println("Calling MyClass2.Concat\n");
return inString1 + inString2;
Compile and load the class as described above and publish the stored
function to the database using the following:
CREATE FUNCTION ConcatTwo(Str1 IN VARCHAR2,
Str2 IN VARCHAR2) RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'MyClass2.Concat(java.lang.String,
java.lang.String) return java.lang.String';
From SQL*Plus, use either the CALL or EXECUTE syntax to invoke
a stored function as follows:
SQLPLUS> var temp varchar2(25);
SQLPLUS> CALL ConcatTwo('Hello', 'World') INTO :temp;
Call completed.
SQLPLUS> print temp;
temp
==========
HelloWorld
OR
SQLPLUS> var temp varchar2(25);
SQLPLUS> EXECUTE :temp := ConcatTwo('Hello','World');
PL/SQL procedure successfully completed.
SQLPLUS> print temp;
temp
==========
HelloWorld
You can run the script inside the java code and after you can make a call from PL/SQL.
I hope that can guide a little.
Joel Pérez

Similar Messages

  • Tuning a procedure and using dbms_job.submit proc that call's functions

    Hi
    I have Procedure that have 3 curosrs which are nested one below with in each other
    and it looks as below
    it's structure will look some thing look like this
    declare
    empno_fetch number;
    CURSOR deu_process IS
    SELECT empno
    FROM emp
    WHERE flg_process = 'N'
    AND ROWNUM <= 5000
    ORDER BY empno;
    CURSOR dup_all IS --c1 fetch around 400000 records
    (select empno
    from emp
    where empno>l_empno
    order by empno
    where rownum<=empno_fetch;
    CURSOR rules IS --c2
    SELECT rule_id, rule_score, name_Of_func
    FROM rule;
    begin
    l_count := 1;
    OPEN dedupe_rule_attr;
    LOOP
    BEGIN
    Here one loop is used for fetching 5000 records at time and
    Here deu_process cursor is opened ,assume it fetches one record
    Here another cursor dup_all is used for fetching the records and assume it fetched 400000 then
    Here another cursor is opened name where it fetches 10 rows
    Here logic is if first row then
    call's stored function which has following functionalty
    it compares fields such as address of outer most cursor i.e deu_process with all the address of the other rows i.e 400000 rows and return a number
    if second row then
    call's another stored function which has
    compares other fields such as first name,last name
    if third then other field
    so on ....
    up to 10
    and then finally ends
    so if i comment all the rules loop then it takes only one min to execute .If it validaes all of them if takes 14 minutes to execute .so there is problem in that 10 procedures to execute
    So i found an approach to run all the rules simultaneously using dbms_job .But i face a problem that i can't uderstand how to send the input and out put parameter's to calling procedure.And these parameter's must be passed by variable from called procedure to calling procedure
    Please suggest me what is the syntax of dbms_job with input and output parameters with variable's that must be passed as formal parameter's
    Regarding DBMS_JOB.SUBMIT I am getting following error
    Declare
    x number:=1;
    b number;
    jobnumber number;
    BEGIN
    DBMS_JOB.SUBMIT(JOB => jobnumber,
    WHAT => 'vamsi_proc1('||x||');',
    NEXT_DATE => (sysdate+1/(86400)),
    INTERVAL => null);
    --dbms_output.put_line('value of b is '||b);
    COMMIT;
    END;
    Declare
    ERROR at line 1:
    ORA-06550: line 1, column 107:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    The symbol "null" was substituted for ")" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 79
    ORA-06512: at "SYS.DBMS_JOB", line 136
    ORA-06512: at line 5
    create or replace procedure vamsi_proc1(v in out number) as
    x number(4);
    begin
    --a:=1;
    insert into emp_vamsi(select 677,ENAME,SAL,DEPTNO,MANAGER from emp where empno=v);
    commit;
    --a:=2;
    --x:=a;
    end;
    using dbms_job.submit proc that call's functions which returns out and in parameters to calling procedure environment .I can't get this with out using data base table's.
    If you have any method for this Plese suggest
    And also please suggest me weather using job's is a good idea ,If not than suggest me what ever will the other approach.
    Thank's and Regard's
    vamsi krishna

    Hi <br>
    I have looked at all sql trace file ,<br>
    I found that there is no problem in sql statemens all of them are using proper <br>indexes execpt the folllowing statement<br>
    <br>
    SELECT nvl(COUNT(ref_appln_no),0)<br>
    FROM ci_cust_dedupe_mast<br>
    WHERE flg_mnt_status='A'<br>
    <br>
    This statement executes only once for 1*3,77000*10 times <br>
    The function that i had sent previously executes more than 4000000*20 times .<br>
    I think all it takes is only for iterations that are caused<br>
    <br>
    I am also sending sql trace for reference
         <br>
    TKPROF: Release 9.2.0.4.0 - Production on Mon Aug 14 17:30:50 2006     <br>
         <br>
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.     <br>
         <br>
    Trace file: afhuat_ora_2204.trc     <br>
    Sort options: default     <br>
         <br>
    ********************************************************************************     <br>
    count = number of times OCI procedure was executed     <br>
    cpu = cpu time in seconds executing      <br>
    elapsed = elapsed time in seconds executing     <br>
    disk = number of physical reads of buffers from disk     <br>
    query = number of buffers gotten for consistent read     <br>
    current = number of buffers gotten in current mode (usually for update)     <br>
    rows = number of rows processed by the fetch or execute call     <br>
    ********************************************************************************     <br>
         <br>
    alter session set sql_trace=true     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 0 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 1 0.00 0.00 0 0 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Misses in library cache during execute: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
    ********************************************************************************     <br>
         <br>
    declare     <br>
    x varchar2(100);     <br>
    y varchar2(100);     <br>
    ap number;     <br>
    begin     <br>
    x:=to_char(sysdate,'dd-mon-rrrr hh:mi:ss');     <br>
    ap:=ap_ci_dedupe_proc;     <br>
    y:=to_char(sysdate,'dd-mon-rrrr hh:mi:ss');     <br>
    dbms_output.put_line(x||' '||ap);     <br>
    dbms_output.put_line(y||' '||ap);     <br>
    end;     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 820.23 0 0 0 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 820.23 0 0 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
    ********************************************************************************     <br>
         <br>
    select user#      <br>
    from     <br>
    sys.user$ where name = 'OUTLN'     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 2 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 r=0 w=0 time=31 us)     <br>
    1 INDEX UNIQUE SCAN I_USER1 (cr=1 r=0 w=0 time=18 us)(object id 44)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    SELECT *     <br>
    FROM ci_dedupe_rule_attr     <br>
    ORDER BY cod_rule_attr_id     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.06 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 21 0.00 0.01 1 3 0 20     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 23 0.00 0.07 1 3 0 20     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT COUNT(1)     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_process = 'N'     <br>
    AND     <br>
    AND     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 22 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 22 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT nvl(COUNT(ref_appln_no),0)     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_mnt_status='A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 1.68 3.03 18867 21183 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 1.68 3.03 18867 21183 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT ref_appln_no     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_process = 'N'     <br>
    AND     <br>
    AND     <br>
    AND     <br>
    ORDER BY ref_appln_no     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.09 18 43 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.09 18 43 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT     <br>
    FROM     <br>
    WHERE     <br>
    AND     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 377709 8.71 7.64 0 0 0 0     <br>
    Fetch 377709 18.18 60.19 19802 1510836 0 377709     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 755419 26.90 67.84 19802 1510836 0 377709     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT NVL(MAX(cod_serial_no),0) + 1     <br>
    FROM ci_dedupe_details_mast     <br>
    WHERE ref_appln_no = :b1     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 2 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 2 2 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT COUNT(1)     <br>
    FROM ci_dedupe_details_mast     <br>
    WHERE ref_appln_no = :b1     <br>
    AND     <br>
    AND flg_mnt_status = 'A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT ref_appln_no FROM     <br>
    (     <br>
    SELECT ref_appln_no     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE     <br>
    AND     <br>
    ORDER BY ref_appln_no     <br>
    )     <br>
    WHERE ROWNUM <= :b2     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 77 0.01 0.00 0 0 0 0     <br>
    Fetch 377786 10.21 12.33 908 377865 0 377709     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 377864 10.23 12.33 908 377865 0 377709     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT cod_rule_id, cod_rule_score, nam_rule_func     <br>
    FROM ci_dedupe_rule_defn     <br>
    WHERE flg_valid = 'Y'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 377708 5.50 4.03 0 0 0 0     <br>
    Fetch 4154788 62.79 54.04 16 4532496 0 3777080     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4532497 68.29 58.07 16 4532496 0 3777080     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select con#,obj#,rcon#,enabled,nvl(defer,0)      <br>
    from     <br>
    cdef$ where robj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 1 2 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 1 2 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),     <br>
    rowid,cols,nvl(defer,0),mtime,nvl(spare1,0)      <br>
    from     <br>
    cdef$ where obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select u.name,o.name, t.update$, t.insert$, t.delete$, t.enabled      <br>
    from     <br>
    obj$ o,user$ u,trigger$ t where t.baseobject=:1 and t.obj#=o.obj# and      <br>
    o.owner#=u.user# order by o.obj#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 4 0.00 0.05 6 9 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 10 0.00 0.05 6 9 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 SORT ORDER BY (cr=1 r=1 w=0 time=4772 us)     <br>
    0 NESTED LOOPS (cr=1 r=1 w=0 time=4747 us)     <br>
    0 NESTED LOOPS (cr=1 r=1 w=0 time=4744 us)     <br>
    0 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=1 r=1 w=0 time=4740 us)     <br>
    0 INDEX RANGE SCAN I_TRIGGER1 (cr=1 r=1 w=0 time=4736 us)(object id 130)     <br>
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 r=0 w=0 time=0 us)     <br>
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 r=0 w=0 time=0 us)(object id 36)     <br>
    0 TABLE ACCESS CLUSTER USER$ (cr=0 r=0 w=0 time=0 us)     <br>
    0 INDEX UNIQUE SCAN I_USER# (cr=0 r=0 w=0 time=0 us)(object id 11)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,     <br>
    o.dataobj#,o.flags      <br>
    from     <br>
    obj$ o where o.obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.02 5 9 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 8 0.00 0.02 5 9 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 3)     <br>
    ********************************************************************************     <br>
         <br>
    select col#, grantee#, privilege#,max(mod(nvl(option$,0),2))      <br>
    from     <br>
    objauth$ where obj#=:1 and col# is not null group by privilege#, col#,      <br>
    grantee# order by col#, grantee#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.01 2 6 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.02 2 6 0 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    INSERT INTO ci_dedupe_details_mast     <br>
    VALUES     <br>
    (     <br>
    :b6,     <br>
    :b5,     <br>
    :b4,     <br>
    :b3,     <br>
    'Y',     <br>
    'N',     <br>
    '',     <br>
    0,     <br>
    SYSDATE,     <br>
    'A',     <br>
    ' ',     <br>
    :b2,     <br>
    'SYSTEM',     <br>
    :b1,     <br>
    1     <br>
    )     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.01 3 3 0 0     <br>
    Execute 1 0.00 0.01 4 1 6 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.02 7 4 6 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1,      <br>
    spare2      <br>
    from     <br>
    obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null      <br>
    and linkname is null and subname is null     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 2 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 2 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select audit$,options      <br>
    from     <br>
    procedure$ where obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 3 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 3 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID PROCEDURE$ (cr=3 r=3 w=0 time=14110 us)     <br>
    1 INDEX UNIQUE SCAN I_PROCEDURE1 (cr=2 r=2 w=0 time=13871 us)(object id 115)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#,      <br>
    d_owner#, nvl(property,0),subname      <br>
    from     <br>
    dependency$,obj$ where d_obj#=:1 and p_obj#=obj#(+) order by order#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 4 0.00 0.07 8 12 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.07 8 12 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    3 SORT ORDER BY (cr=12 r=8 w=0 time=72867 us)     <br>
    3 NESTED LOOPS OUTER (cr=12 r=8 w=0 time=72813 us)     <br>
    3 TABLE ACCESS BY INDEX ROWID DEPENDENCY$ (cr=4 r=4 w=0 time=41297 us)     <br>
    3 INDEX RANGE SCAN I_DEPENDENCY1 (cr=3 r=3 w=0 time=25897 us)(object id 127)     <br>
    3 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=8 r=4 w=0 time=31484 us)     <br>
    3 INDEX UNIQUE SCAN I_OBJ1 (cr=5 r=2 w=0 time=14872 us)(object id 36)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select order#,columns,types      <br>
    from     <br>
    access$ where d_obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.02 3 4 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4 0.00 0.02 3 4 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID ACCESS$ (cr=4 r=3 w=0 time=27026 us)     <br>
    1 INDEX RANGE SCAN I_ACCESS1 (cr=3 r=2 w=0 time=21717 us)(object id 129)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece      <br>
    from     <br>
    idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.02 3 7 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 7 0.00 0.02 3 7 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_SB4$ (cr=2 r=2 w=0 time=19830 us)     <br>
    0 INDEX RANGE SCAN I_IDL_SB41 (cr=2 r=2 w=0 time=19826 us)(object id 123)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece      <br>
    from     <br>
    idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.03 3 9 0 2     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 7 0.00 0.03 3 9 0 2     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_UB1$ (cr=2 r=2 w=0 time=21757 us)     <br>
    0 INDEX RANGE SCAN I_IDL_UB11 (cr=2 r=2 w=0 time=21753 us)(object id 120)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece      <br>
    from     <br>
    idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_CHAR$ (cr=2 r=2 w=0 time=19465 us)     <br>
    0 INDEX RANGE SCAN I_IDL_CHAR1 (cr=2 r=2 w=0 time=19461 us)(object id 121)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece      <br>
    from     <br>
    idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_UB2$ (cr=2 r=2 w=0 time=15070 us)     <br>
    0 INDEX RANGE SCAN I_IDL_UB21 (cr=2 r=2 w=0 time=15066 us)(object id 122)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select baseobject,type#,update$,insert$,delete$,refnewname,refoldname,     <br>
    whenclause,definition,enabled,property,sys_evts,nttrigcol,nttrigatt,     <br>
    refprtname,rowid      <br>
    from     <br>
    trigger$ where obj# =:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 1 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 1 2 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=2 r=1 w=0 time=9352 us)     <br>
    1 INDEX UNIQUE SCAN I_TRIGGER2 (cr=1 r=1 w=0 time=9340 us)(object id 131)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select owner#      <br>
    from     <br>
    obj$ o where obj# = :1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 3 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=3 r=0 w=0 time=15 us)     <br>
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=2 r=0 w=0 time=7 us)(object id 36)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select tc.type#,tc.intcol#,tc.position#,c.type#, c.length,c.scale,     <br>
    c.precision#,c.charsetid,c.charsetform      <br>
    from     <br>
    triggercol$ tc,col$ c ,trigger$ tr where tc.obj#=:1 and c.obj#=:2 and      <br>
    tc.intcol#=c.intcol# and tr.obj# = tc.obj# and (bitand(tr.property,32) !=      <br>
    32 or bitand(tc.type#,20) = 20) union select type#,intcol#,position#,69,0,0,     <br>
    0,0,0 from triggercol$ where obj#=:3 and intcol#=1001 union select tc.type#,     <br>
    tc.intcol#,tc.position#,121,0,0,0,0,0 from triggercol$ tc,trigger$ tr where      <br>
    tr.obj# = tc.obj# and bitand(tr.property,32) = 32 and tc.obj# = :4 and      <br>
    bitand(tc.type#,20) != 20     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 34 0.00 0.05 8 236 0 33     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 36 0.00 0.05 8 236 0 33     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    33 SORT UNIQUE (cr=236 r=8 w=0 time=54877 us)     <br>
    33 UNION-ALL (cr=236 r=8 w=0 time=54606 us)     <br>
    33 NESTED LOOPS (cr=197 r=8 w=0 time=53779 us)     <br>
    33 NESTED LOOPS (cr=162 r=8 w=0 time=53053 us)     <br>
    77 TABLE ACCESS CLUSTER COL$ (cr=83 r=6 w=0 time=40045 us)     <br>
    1 INDEX UNIQUE SCAN I_OBJ# (cr=2 r=2 w=0 time=13764 us)(object id 3)     <br>
    33 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=79 r=2 w=0 time=12523 us)(object id 133)     <br>
    33 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=35 r=0 w=0 time=466 us)     <br>
    33 INDEX UNIQUE SCAN I_TRIGGER2 (cr=2 r=0 w=0 time=152 us)(object id 131)     <br>
    0 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=2 r=0 w=0 time=5 us)(object id 133)     <br>
    0 NESTED LOOPS (cr=37 r=0 w=0 time=574 us)     <br>
    33 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=2 r=0 w=0 time=81 us)(object id 133)     <br>
    0 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=35 r=0 w=0 time=350 us)     <br>
    33 INDEX UNIQUE SCAN I_TRIGGER2 (cr=2 r=0 w=0 time=139 us)(object id 131)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2))     <br>
    from     <br>
    objauth$ where obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by      <br>
    grantee#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.00 0 6 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.00 0 6 0 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    UPDATE     <br>
    SET     <br>
    WHERE ref_appln_no = :b1     <br>
    AND flg_mnt_status = 'A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.16 9 8 17 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.16 9 8 17 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,     <br>
    NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0)      <br>
    from     <br>
    seg$ where ts#=:1 and file#=:2 and block#=:3     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.01 3 9 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.01 3 9 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS CLUSTER SEG$ (cr=3 r=3 w=0 time=17332 us)     <br>
    1 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=2 r=2 w=0 time=10258 us)(object id 9)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    INSERT INTO ci_dedupe_details     <br>
    VALUES     <br>
    (     <br>
    :b31,     <br>
    :b32,     <br>
    :b31,     <br>
    :b30,     <br>
    :b29,     <br>
    :b28,     <br>
    :b27,     <br>
    :b26,     <br>
    :b25,     <br>
    :b24,     <br>
    :b23,     <br>
    :b22,     <br>
    :b21,     <br>
    :b20,     <br>
    :b19,     <br>
    :b18,     <br>
    :b17,     <br>
    :b16,     <br>
    :b15,     <br>
    :b14,     <br>
    :b13,     <br>
    :b12,     <br>
    :b11,     <br>
    :b10,     <br>
    :b9,     <br>
    :b8,     <br>
    :b7,     <br>
    :b6,     <br>
    :b5,     <br>
    :b4,     <br>
    :b3,     <br>
    :b2,     <br>
    :b1,     <br>
    'N',     <br>
    0,     <br>
    'E' )     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.01 0.03 4 1 5 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.01 0.03 4 1 5 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,      <br>
    sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,      <br>
    spare1, spare2, avgcln      <br>
    from     <br>
    hist_head$ where obj#=:1 and intcol#=:2     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 36 0.00 0.00 0 0 0 0     <br>
    Fetch 36 0.00 0.02 3 108 0 36     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 73 0.00 0.02 3 108 0 36     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: RULE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    COMMIT     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.01 0 0 1 0     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4 0.00 0.01 0 0 1 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.00 0 0 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
         <br>
         <br>
         <br>
    ********************************************************************************     <br>
         <br>
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 820.23 0 0 0 2     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 5 0.00 820.23 0 0 0 2     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Misses in library cache during execute: 1     <br>
         <br>
         <br>
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 49 0.00 0.10 3 3 0 0     <br>
    Execute 755577 14.25 11.90 17 10 29 3     <br>
    Fetch 4910422 92.89 130.18 39671 6442895 0 4532611     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 5666048 107.14 142.19 39691 6442908 29 4532614     <br>
         <br>
    Misses in library cache during parse: 11     <br>
         <br>
    17 user SQL statements in session.     <br>
    35 internal SQL statements in session.     <br>
    52 SQL statements in session.     <br>
    ********************************************************************************     <br>
    Trace file: afhuat_ora_2204.trc     <br>
    Trace file compatibility: 9.00.01     <br>
    Sort options: default     <br>
         <br>
    1 session in tracefile.     <br>
    17 user SQL statements in trace file.     <br>
    35 internal SQL statements in trace file.     <br>
    52 SQL statements in trace file.     <br>
    36 unique SQL statements in trace file.     <br>
    5666466 lines in trace file.     <br>
    Regards<br>
    vamsi krishna<br>

  • How to schedule a job to run after completion of each run using DBMS_JOB ?

    Hi Gurus,
    Please let me know if the subject requirement can be fulfilled. I want to schedule a job using DBMS_JOB to run a script sequentially after completion of each run.
    Thanks in advance.
    Santosh

    Hi Santosh
    Instead to use the old dbms_job package use the dbms_scheduler and raise / catch events.
    Oracle create dbms_scheduler also for this purpose you need.
    You can find tons of examples on the web.
    Aurelio

  • Schedule a job using dbms_job package

    SQL to schedule a job using DBMS_JOB.
    variable jobno number;
    variable status number;
    begin
    dbms_job.submit(:jobno, 'x(:status);', trunc(sysdate)+8/24,
    'trunc(sysdate)+1+8/24', null);
    commit;
    end;
    It fails and returns the following error ...
    ORA-01008: not all variables bound
    Is it possible to schedule a job to run a procedure with "IN OUT" parameter? I would appreciate any assistance.
    Proc runs if I execute it from command mode and there are no issues.

    You cannot pass parameters back from a job-- Oracle spawns a separate session to run your job, so that session would receive any OUT parameters and end immediately after the job finishes. Even if Oracle let you do this, you would lose the OUT value as soon as the job ended.
    If you want a job to return a status, you can-
    1) Store the status in a table
    2) Queue a status message in an Oracle Advanced Queue
    3) Use dbms_alert to alert another process
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Using dbms_job but it can't start automatically

    I want to use dbms_job for job scheduling in Oracle 8i but got some serious problem.
    [Question 1]
    If I execute dbms_job like following, I've error :
    [Execute]
    dbms_job.submit(jobno,
    'my_proc',
    sysdate,
    'sysdate + 1/86400');
    [Error]
    declare
    ERROR at line 1:
    ORA-06550: line 1, column 149:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    := . ( % ;
    The symbol ";" was substituted for "END" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 72
    ORA-06512: at "SYS.DBMS_JOB", line 140
    ORA-06512: at line 18
    If I execute dbms_job like following, I've n o error message.
    [Execute]
    ----------------------------------dbms_job.submit(jobno,
    'my_proc',
    sysdate,
    'sysdate + 1/86400',
    true,
    123,
    true);
    How come it is required to input such default parameter.
    [Question 2]
    Even I can submit the job successfully, it can't run automatically.
    If I try to force it to run by executing dbms_job.run(jobno, true), I've the following error :
    [Error]
    ERROR at line 1:
    ORA-12011: execution of 1 jobs failed
    ORA-06512: at "SYS.DBMS_IJOB", line 394
    ORA-06512: at line 1
    My config for my server is like this :
    job_queue_processes = 2
    job_queue_interval = 1
    By checking the value from user_jobs, I found that next_date, next_sec are not refreshed and with broken = 'N' and failures = 0.
    Sometimes if I restart the server or compile the what "my_proc", the job run automatically.
    Can anyone help me to solve it ?
    Rgds,
    Edward
    null

    I've found syntax error in your code.
    You forgot to put ';' after the call(my_proc) to the procedure. It should look like as mentioned
    below.
    dbms_job.submit(jobno,
    'my_proc;',
    sysdate,
    'sysdate + 1/86400');
    It should work now.
    null

  • Using DBMS_JOB to schedule auto execution of procedure on a daily basis

    I need to implement a batch procedure for my project and would be using
    DBMS_JOB for the same purpose.I have tried creating a job for the same
    that I submitted using DBMS_JOB.SUBMIT() and I ran the job initially using
    DBMS_JOB.run(). Now at this instant the next_time parameter to run the proc
    is calculated automaticlly. How does the proc run automatically after that
    in specified interval of time?? Do I need to access some dba_XX views for the
    same.....or set some database parameters??

    You will need to set the "interval" portion of the job. Either with dbms_job.submit, or dbms_job.interval.
    Lets say you wanted to run the job every morning at 4:30am, it would be:
    trunc(sysdate)+1+4/24+30/1440
    The "+1" increases it one day.
    The "+4/24" increases it 4 hours.
    The "+30/1440" increases it 30 minutes.
    Hope this helps.
    Brian

  • Using dbms_job for the 1st time

    I am attempting to use dbms_job for the 1st time and doing some test, but I can't get it to run.
    Connected to: Oracle Database 10g Release 10.1.0.2.0 - Production
    SQL*Plus: Release 8.0.6.0.0 - Production on Wed Mar 1 10:36:18 2006
    I have alter system set job_queue_interval = 10;
    When I tried
    SQL> alter system set job_queue_interval = 10;
    alter system set job_queue_interval = 10
    ERROR at line 1:
    ORA-25138: JOB_QUEUE_INTERVAL initialization parameter has been made obsolete
    my code is as below.
    1 create or replace procedure d1 is
    2 v_job_no binary_integer;
    3 begin
    4 DBMS_JOB.SUBMIT(
    5 v_job_no,
    6 'test_dbms_job',
    7 trunc(sysdate,'hh')+1/24,
    8 'trunc(sysdate,''hh'')+2/24');
    9 commit;
    10* end;
    SQL> /
    Procedure created.
    SQL> exec d1;
    BEGIN d1; END;
    ERROR at line 1:
    ORA-06550: line 1, column 107:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    := . ( @ % ;
    The symbol ";" was substituted for "END" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 79
    ORA-06512: at "SYS.DBMS_JOB", line 136
    ORA-06512: at "PMC_ERP_PROD.D1", line 4
    ORA-06512: at line 1
    Any clues??

    sorry, when I cut and pasted this I but in
    job_queue_interval in twice.
    I alredy have the following set also.
    SQL> alter system set job_queue_processes = 4;
    System altered.Well, it's good...
    And what about semicolon ? ;-)

  • Running a procedure which has parameters using dbms_job.submit

    I have a procedure which accepts some parameter and i need to schedule this using dbms_job in another procedure. My intention is to execute test_proc without waiting for test_asynch_proc
    CREATE or REPLACE PROCEDURE test_asynch_proc(p_1 in number) as
    i number;
    BEGIN
    for i in 1.. 100000
    loop
         insert into item_p values (dbms_random.random, p_1,sysdate);
    end loop;
    commit;
    END;
    I have another procedure which does an asynchronous call to this procedure by scheduling this procedure.
    create or replace procedure test_proc is
    jobno binary_integer;
    --x number :=100;
    begin
         insert into test_table values(1,sysdate);
         dbms_job.submit(job => jobNo,
         what=>'test_asynch_proc(''100'');',
         next_date=>sysdate );
    commit;
    dbms_output.put_line ('insert complete at '|| to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS'));
    end;
    but here instead of
    what=>'test_asynch_proc(''100'');'
    i need to give a variable. How can i do that?
    Thanks,
    mv

    There is another possibility where job parameters are stored in a parameter table with the job number that can be retrieved by the job code:
    bas002>
    bas002> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
    PL/SQL Release 10.2.0.2.0 - Production
    CORE    10.2.0.2.0      Production
    TNS for 32-bit Windows: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    bas002>
    bas002> drop table t;
    Table dropped.
    bas002> drop table p;
    Table dropped.
    bas002>
    bas002> create table t(x int,d date);
    Table created.
    bas002> create table p(jn int, jp int);
    Table created.
    bas002>
    bas002>
    bas002> create or replace procedure test_asynch_proc as
      2  begin
      3  insert into t select jp, (select sysdate from dual)
      4   from p where jn = sys_context('USERENV','BG_JOB_ID');
      5  commit;
      6  end;
      7  /
    Procedure created.
    bas002> show errors
    No errors.
    bas002>
    bas002> create or replace procedure test_proc (tp number) is
      2  jobno binary_integer;
      3  begin
      4  dbms_job.submit(
      5   job => jobno,
      6   what=>'test_asynch_proc;',
      7   next_date=>sysdate );
      8   insert into p values(jobno, tp);
      9  commit;
    10  end;
    11  /
    Procedure created.
    bas002> show errors
    No errors.
    bas002>
    bas002> alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
    Session altered.
    bas002> select sysdate from dual;
    SYSDATE
    28-FEB-2008 10:40:13
    bas002>
    bas002> exec test_proc(1);dbms_lock.sleep(5);
    PL/SQL procedure successfully completed.
    bas002> select * from t;
             X D
             1 28-FEB-2008 10:40:17
    bas002> exec test_proc(2);dbms_lock.sleep(5);
    PL/SQL procedure successfully completed.
    bas002> select * from t;
             X D
             1 28-FEB-2008 10:40:17
             2 28-FEB-2008 10:40:22Message was edited by:
    Pierre Forstmann
    Message was edited by:
    Pierre Forstmann

  • SCHEDULER with using dbms_job.submit package

    i want to use a procedure in SCHEDULER with using dbms_job.
    How i use this procedure in SCHEDULER
    Plz, Help me
    Message was edited by:
    Nilesh Hole

    Hi,
    For 10g and up you should be using dbms_scheduler for scheduling. Some examples are here
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse.htm#i1033533
    and the homepage is at
    http://www.oracle.com/technology/products/database/scheduler/index.html
    Here's an example that runs daily at 2am
    begin
    dbms_scheduler.create_job('myjob',
        job_type=>'plsql_block',
        job_action=>'dbms_lock.sleep(10);',
        start_date=>null,
        repeat_interval=>'freq=daily;byhour=2;byminute=0',
        enabled=>true , auto_drop=>true
    end;
    /Hope this helps,
    Ravi.

  • Scheduling job using DBMS_JOB.SUBMIT()

    Hi people I hav esubmitted a job using DBMS_JOB.SUBMIT() package.I have set the time it should run after 5 minutes from the time i created.but now my question is how do we know the submitted job has been executed within specified interval?.am using oracle 9i.please suggest me.
    Regards
    VIDS

    You should refer to DBA_JOBS and DBA_JOBS_RUNNING views to get information about your jobs
    Please refer to this address to get more information about these views
    http://pandazen.wordpress.com/2007/12/19/oracle-job-to-be-continued/
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Using DBMS_JOB,SUBMIT

    Hello,
    I would like to find out how to use DBMS_JOB.SUBMIT to run a certain procedure evry morning at say 5:00 AM
    Thanks
    Doug

    Hi,
    This info. taken from oracle documentation............... For more info look in oracle Documentation. I hope this will help you.
    DBMS_JOB subprograms schedule and manage jobs in the job queue.
    This chapter discusses the following topics:
    Requirements
    Using the DBMS_JOB Package with Oracle Real Application Clusters
    Summary of DBMS_JOB Subprograms
    Requirements
    There are no database privileges associated with jobs. DBMS_JOB does not allow a user to touch any jobs except their own.
    Using the DBMS_JOB Package with Oracle Real Application Clusters
    For this example, a constant in DBMS_JOB indicates "no mapping" among jobs and instances, that is, jobs can be executed by any instance.
    DBMS_JOB.SUBMIT
    To submit a job to the job queue, use the following syntax:
    DBMS_JOB.SUBMIT( JOB OUT BINARY_INTEGER,
    WHAT IN VARCHAR2, NEXT_DATE IN DATE DEFAULTSYSDATE,
    INTERVAL IN VARCHAR2 DEFAULT 'NULL',
    NO_PARSE IN BOOLEAN DEFAULT FALSE,
    INSTANCE IN BINARY_INTEGER DEFAULT ANY_INSTANCE,
    FORCE IN BOOLEAN DEFAULT FALSE)
    Use the parameters INSTANCE and FORCE to control job and instance affinity. The default value of INSTANCE is 0 (zero) to indicate that any instance can execute the job. To run the job on a certain instance, specify the INSTANCE value. Oracle displays error ORA-23319 if the INSTANCE value is a negative number or NULL.
    The FORCE parameter defaults to FALSE. If force is TRUE, any positive integer is acceptable as the job instance. If FORCE is FALSE, the specified instance must be running, or Oracle displays error number ORA-23428.
    DBMS_JOB.INSTANCE
    To assign a particular instance to execute a job, use the following syntax:
    DBMS_JOB.INSTANCE( JOB IN BINARY_INTEGER,
    INSTANCE IN BINARY_INTEGER,
    FORCE IN BOOLEAN DEFAULT FALSE)
    The FORCE parameter in this example defaults to FALSE. If the instance value is 0 (zero), job affinity is altered and any available instance can execute the job despite the value of force. If the INSTANCE value is positive and the FORCE parameter is FALSE, job affinity is altered only if the specified instance is running, or Oracle displays error ORA-23428.
    If the FORCE parameter is TRUE, any positive integer is acceptable as the job instance and the job affinity is altered. Oracle displays error ORA-23319 if the INSTANCE value is negative or NULL.
    DBMS_JOB.CHANGE
    To alter user-definable parameters associated with a job, use the following syntax:
    DBMS_JOB.CHANGE( JOB IN BINARY_INTEGER,
    WHAT IN VARCHAR2 DEFAULT NULL,
    NEXT_DATE IN DATE DEFAULT NULL,
    INTERVAL IN VARCHAR2 DEFAULT NULL,
    INSTANCE IN BINARY_INTEGER DEFAULT NULL,
    FORCE IN BOOLEAN DEFAULT FALSE )
    Two parameters, INSTANCE and FORCE, appear in this example. The default value of INSTANCE is NULL indicating that job affinity will not change.
    The default value of FORCE is FALSE. Oracle displays error ORA-23428 if the specified instance is not running and error ORA-23319 if the INSTANCE number is negative.
    DBMS_JOB.RUN
    The FORCE parameter for DBMS_JOB.RUN defaults to FALSE. If force is TRUE, instance affinity is irrelevant for running jobs in the foreground process. If force is FALSE, the job can run in the foreground only in the specified instance. Oracle displays error ORA-23428 if force is FALSE and the connected instance is the incorrect instance.
    DBMS_JOB.RUN( JOB IN BINARY_INTEGER,
    FORCE IN BOOLEAN DEFAULT FALSE)

  • Scheduling stored procedure using DBMS_JOB package

    I have stored procedure called “extract_every_day”, I want this procedure to run automatically at 7:00 PM every day.
    I used DBMS_JOB.SUBMIT to achieve this, below is pl/sql block
    DECLARE
    v_jobno number ;
    BEGIN
    DBMS_JOB.SUBMIT
    (v_jobno,
    ' extract_every_day ',
    TRUNC (SYSDATE) + 1 + 9/24,
    'TRUNC (SYSDATE) + 1 + 9/24');
    COMMIT;
    END;
    When I run above pl/sql block is that mean procedure “extract_every_day” executes every day and what is the significance of “job” OUT parameter in “DBMS_JOB.SUBMIT “ procedure. Also how can I see list of jobs submitted.
    Any help is appreciated.
    Thanks

    The OUT parameter is the unique number of the job being executed. This is the Sequence generated from sequence sys.jobseq
    Also, in the example you have provided, the Job will run at 9Am and not 7PM.
    To make it run at 7PM every day change the following lines :
    'TRUNC (SYSDATE) + 1 + 9/24'
    'TRUNC (SYSDATE) + 1 + 9/24'
    To ,
    'TRUNC (SYSDATE) + 19/24' <-- Changed
    'TRUNC (SYSDATE) + 1 + 19/24' <-- Changed
    Also do remember to include the parameter "job_queue_processes" parameter within the init.ora file. This parameter is used to determine the max no
    of concurrently running jobs (i.e. Set in Init.ora).
    NOTE :- Job_queue_process cannot be set to 0. If set to 0, no jobs is run.
    he view dba_jobs and dba_jobs_running should be used to view the jobs.
    -- Shailender Mehta --

  • Procedure successful when using dbms_job, but fails in a shell script

    I have a procedure which is throwing the following error when run from a shell script. This procedure completes successfully when run using dbms_job
    ORA-00164 distributed autonomous transaction disallowed within migratable distributed transaction

    Mohan et al,
    When I get an ORA error that I don't understand I plug it into Google; use the whole error code, ie 'ORA-00164'.
    The second link in this case gives a reasonable explanation of what is happening.
    http://www.dbasupport.com/oracle/ora9i/autonomoustrans.shtml
    Cheers,
    Colin

  • Can we use DBMS_JOB.BROKEN IN PL/SQL CODE

    HI
    below is my code
    CREATE OR REPLACE procedure dept_insert1 is
    X NUMBER;
    y number;
    BROKEN_FLAG CHAR(1);
    begin
    Select count(*) into Y from dept1;
    if y < 20 then
    SELECT trim(BROKEN) INTO BROKEN_FLAG FROM USER_JOBS WHERE JOB='1517';
    DBMS_OUTPUT.PUT_LINE ('FLAG.....'||BROKEN_FLAG);
    IF BROKEN_FLAG='Y' THEN
    DBMS_JOB.BROKEN(1517,FALSE);
    DBMS_OUTPUT.PUT_LINE ('FLAG.....1'||BROKEN_FLAG);
    DBMS_JOB.RUN(1517);
    DBMS_OUTPUT.PUT_LINE ('FLAG.....2'||BROKEN_FLAG);
    END IF;
    for i in 1..5
    loop
    insert into dept1 values (i,'DEPT'||i,'India');
    commit;
    end loop;
    end if;
    DBMS_JOB.BROKEN(1517,TRUE);
    End;
    i have 2 jobs --
    1st is validation job and second will excute if 1st compelete successfully.
    so hw can we do that??
    i did in following way --
    i created 2nd job and load it then set broken flag is Y then i called that job in my 1st job ..above is my proc which i using in my 1st job.
    but my 1st job fails every time and unable to broken flag =n for second job
    Reply ASAP

    1st is validation job and second will excute if 1st compelete successfully.
    so hw can we do that??using DBMS_JOBs to implement this sort of workflow is rather difficult because it is hard to co-ordinate these things, being as how they are background processes and don't talk nicely with each other.
    One way is to just have one job which calls a wrapping procedure which executes the procedure from the first job and then conditionally executes the code from the second job. This is the easiest way so I presume you have a good reason for not implementing things this way.
    Alternatively you could build a progress tracking table. the code in the first job sets a status flag. The code in the second jobs checks this flag to determine whether to continue with its processing or abend.
    Cheers, APC

  • Want job to execute at 00 , 30 mins every hour using dbms_job.

    Hi All
    Oracle 9.2 , Solaris 8
    I want to schedule a job every 30 mins using dbms_job. it should run exactly as
    12:00 then
    12:30
    22:00 and so on.
    So the interval should be 30 mins , but it should run sharp at beginning of an hour and half past that hour.
    Can you provide me the logic for interval.
    Thanks in advance

    SQL> select sysdate,trunc(sysdate)+ceil((sysdate-trunc(sysdate))*60*24/30)/2/24 from dual;
    SYSDATE             TRUNC(SYSDATE)+CEIL
    06/12/2010 15:50:16 06/12/2010 16:00:00
    SQL> select sysdate,trunc(sysdate)+ceil((sysdate-trunc(sysdate))*60*24/30)/2/24 from dual;
    SYSDATE             TRUNC(SYSDATE)+CEIL
    06/12/2010 16:07:06 06/12/2010 16:30:00Nicolas.

  • How can event driven scheduling will be acheived using DBMS_JOB

    Hi,
    I am running oracle jobs using DBMS_JOB package . I need to check for particular event is happend or not then only It should run my job.Can I acheive this using dbms_job.What is the syntax for it.Where Can i add dependencies in dbms_job
    Thanks

    Job 1 - finishes 2 AM
    Job 2 should start right after Job 1 , this is a dependency tree and dbms_job is not good at this.
    If this is your requirement then you have to build your own wrappers on top of dbms_job to make it happen. Simplest is to loop and wait till job 1 finishes and then launch job 2.

Maybe you are looking for

  • CS4 does not support XP 64....

    I just read this from Curt: "Premiere CS4 does not support XP64. It supports XP 32, Vista 32, or Vista 64 on PC" Why not? and will it be supported in the future? Will it work with Windows OS 7?

  • Buzzing sound when I play a note...

    With Garageband (1) I suddenly, and for no apparent reason developed a problem. Whenever I played a note it would buzz. I don't have the same problem with Pro-tools and I'm using the same keyboard and everything. So I bought Ilife 5' thinking that wo

  • Decode from other table?

    how can i decode a column value from another table? e.g. the view selects an ID from TABLE1 and wants to add a column "Description" that decodes the value of the ID column. The decode() function is usable for a small set of fixed decodings. But what

  • Java(TM) Platform SE binary doesn't work on any website, on any browser

    I'm on Windows 7 Ultimate 32bit, everything's working fine, I always keep my system clean, I also keep the registry as clean as possible, I have a problem from at least a couple of months, so "Java(TM) Platform SE binary" doesn't work on any website,

  • Where is the portuguese version of itunes 7.x for windows ?

    Where is the portuguese version of itunes 7.x for windows ? this is the link showing down portuguese with one of languages. the sort cut is : menu edit-> preferences-> language -> but portuguese does not show Any help? LINK http://www.apple.com/suppo