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>

Similar Messages

  • 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)

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • How to create stored procedures and use those in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    Hello,
    There is a document explainining how to use Oracle stored proc with Crystal reports.
    Check at:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1084c536-711e-2b10-e48a-924a60745253
    It is for older version but it should work and you can refer to it to get general idea how to start with it. It has a sample oracle stored proc and how to connect it from Crystal Reports.

  • 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

  • Calling a stored procedures and using its output parameters in a report

    Hi,,
    I have a procedure defined in a package on the database. This procedure returns a number of output parameters. How do I call this procedure and use the output parameters in my report ?
    Thanks, Mark

    Depends on the level at which the procedure has to be called. If its at report-level, call the Form in the BEFORE-REPORT-trigger (or AFTER-PARAMFORM) and store the out-values in Placeholder-columns. These you can use anywhere in your report.

  • About use mouse middle key to call JavaScript function question

    I want use mouse middle key to call JavaScript function (<a href="javascript:help()">) help() will open a new Window and direct to my GUI Help Page but when I click it with middle key ,it will open new Tab blank Page that url="javascript:help()"; can not Executive help function... Is this a Firefox Bug or correct behavior in Firefox? thank.

    You need to use a left click to handle JavaScript links.
    See also http://kb.mozillazine.org/browser.link.open_newwindow.restriction

  • 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.

  • The error in using dbms_job.submit()?

    I login as a normal user, execute a pl/sql block as follows and succeed to create a job.
    declare
    num_new_job_no number;
    begin
    sys.dbms_job.submit(job => num_new_job_no,
    what => 'dbms_output.put_line(''test'')',
    next_date => to_date('24-10-2003 11:04:42', 'dd-mm-yyyy hh24:mi:ss'),
    interval => 'sysdate+1/24');
    commit;
    exception
    when others then
    dbms_output.put_line(sqlcode||sqlerrm);
    end;
    But after a hour I execute the code again, and return a error as follows:
    -6550ORA-06550: �� 1 ��, �� 122 ��:
    PLS-00103: ���ַ�� "END"����Ҫ����֮һʱ��
    := . ( % ;
    ��� ";" ���滻Ϊ "END" �����
    Who can tell why? Thanks.

    DBMS_JOB can only execute complete PL/SQL programs. You can run anonymous blocks, like this:
    declare
    num_new_job_no number;
    begin
    sys.dbms_job.submit(job => num_new_job_no,
    what => 'begin dbms_output.put_line(''test''); end;',
    next_date => sysdate + (1/1000),
    interval => 'sysdate+1/24');
    commit;
    exception
    when others then
    dbms_output.put_line(sqlcode||sqlerrm);
    end;However, you will never see any output from this job. Jobs run in a recursive session, so there is no client to which DBMS_OUTPUT can write. However, you can see whether it ran by checking in the USER_JOBS view.
    Cheers, APC

  • Is this the correct syntax to submit a job using DBMS_JOB.SUBMIT?

    Hello,
    Is this the correct syntax to submit a job?
    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;';
    v_interval VARCHAR2(1000) := 'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate, v_interval, false);
    COMMIT;
    END;
    Thanks
    Doug

    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'BEGIN
    PREPARE_ORACLE_TEXT_SEARCH; END;';
    v_interval VARCHAR2(1000) :=
    'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate,
    v_interval, false);
    COMMIT;
    END;
    About your error:
    PLS-00201: identifier 'PREPARE_ORACLE_TEXT_SEARCH'
    must be declared
    ORA-06550: line 1, column 96:
    PL/SQL: Statement ignored
    The problem is that the job cannot find the procedure
    (maybe own by an other user). The user who run the
    job is not the same as the owner of the package.
    Bye, AronYou forget the semicolon after END.
    But we don't need here begin - end Block.
    So it's OK.
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;'[b];
    As you right mentioned, it is probably problem with owner or typo in the name of procedure.
    Regards
    Dmytro Dekhtyaryuk
    Message was edited by:
    dekhtyar

  • Can I use a submit button that will automatically flatten and open up the save as screen?

    Hello,
    I'm working with forms in Adobe Acrobat Pro 9 and I want the submit button to flatten the document then open the save as screen.  I know I can print to pdf and this automatically will open that screen, but these forms are going to be used with tablets that may or may not have the "print to adobe" as an option.  Is there another way to flatten?  I know the PDF Optimizer will do that too, but it isn't an executable option in the button properties.  Magic anyone?  Thanks.

    It depends very much on the platform and the applications used by the users of this form. If they are using non-Adobe software, all bets are off.
    Also, some tablets (iPad) don't support JS, so even if they do use Adobe's Reader for the iOS, there's not much that can be done in the way of scripting.
    Generally speaking: In Acrobat you can flatten the form, but in Reader that's not possible. What you can do, though, is create a function that makes the form fields read-only, thus preventing the user from editing them after having submitted the file.

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • I want to use iMovie 6 on my new MacBook Pro running Lion 10.7.5. It won't download. Can I download Snow Leopard instead and use iMovie 6 with that older OS?

    I have a MacBook Pro I recently purchased 'cause my old G4 just couldn't output my video films properly. My new MacBook Pro is running 10.7.5 OS Lion. Don't like iMovie 11 and want to use iMovie 6. It won't download on Lion. Could I download Snow Leopard (deleting OS 10.7.5) and use iMovie 6 then? I saw a previous thread that said that could be done.

    AppleMan...I have the same iMac you have...i-7 16GB with a SSD....just bought it second hand and it is about 1.5 years old....it was maxed out with upgrades when the original owner bought it.  It was also restored back to factory settings prior to me taking possession. 
    I am making home movies in iMovie 11....max length 30 minutes or less.  I am totally new to this editing.  I am using HD footgage filmed from my Hero GoPro 3.  I am finding that the movies that I am creating are skipping, staggering, hanging up etc...usually where I had transitions.  I am certain I have enough power and memory in my iMac, so what's the issue?  I read one of your other posts about optimizing each event or clip to 1080p?  Is this what I need to do for every clip I import?  Can I do this for all the clips at once on import?  I also read that I may need to export the movie to quick time for smooth playback?? 
    Any help you can provide would be appreciated!
    Sincerely,
    Matt
    PS=How do I e mail you directly here in the posts?  I went to your profile but didn't see any "e mail" or "contact" member button to click on.

Maybe you are looking for

  • How to execute procedure in SQL Worksheet ?

    Hi, anybody know, how I can execute procedure here? I try EXEC sec_roles, EXEC security_admin.sec_roles, EXECUTE - there is a SQL statement error. When I use CALL - there is no such procedure (I have execute previleges). Although in SQLPlus EXEC work

  • Recovery files deleted

    Hi, I deleted my recovery files from  (Hp-Recovery D) also from my recycle bin  i dont have a previouse version for it to restore but i do have copies of those 20GB files in 5 different CD's but when i try to do the samething as in the past opening t

  • OpenGL won't enable...

    Hi. I noticed that I can't use effects such as repousse one of the features that encouraged me to upgrade to cs5. I was told to enable OpenGl drawing from Preferences but when I go there and try to enable it, it's greyed out and says: Graphics hardwa

  • Recently, new downloads aren't appearing on iPhone when synching from iTunes

    When I synch from the computer to iphone and ipad, my new downloads arent copying (and I have it set to compy complete library) and now some content isnt available....I found a way to share the libray with my computer, but I had to be on wifi with th

  • Wi-fi connected showing no bars

    Ever since the last wi-fi update on my Nokia Lumia 521 when I connect at home the wi-fi is green but shows no bars. Before the update it would show full 5 bars when connected via wi-fi at home why is this? It has been causing problems with downloadin