problem with dbms_job executing [message #61918] |
Wed, 09 June 2004 22:41 |
_simma_dba
Messages: 34 Registered: November 2003
|
Member |
|
|
I have very strange problem
When I try to execute some procedure (PROCEDURE_1) using dbms_job it looks like the job has been executed (there is no failures) but when i check my tables i see that job has done nothing.
The problem is when I execute my procedure using:
EXEC PROCEDURE_1; I dont have any problem. What is wrong with the job?
|
|
|
|
Re: problem with dbms_job executing [message #61939 is a reply to message #61920] |
Fri, 11 June 2004 02:41 |
_simma_dba
Messages: 34 Registered: November 2003
|
Member |
|
|
Here is the procedure that I try to execute using DBMS_JOB packet:
CREATE OR REPLACE PROCEDURE "PROCEDURE_1" IS
BEGIN
INSERT INTO TABLE_1@DB01 (
COL1, COL2, COL3, COL4, COL5, COL6, COL7, COL8, COL9,
COL10, COL11,COL12)
SELECT dnevna_telekom_seq.NEXTVAL@DB01, TO_CHAR(datum,'yyyymmdd') ,posta,'0'||SUBSTR(analitika,1,2),row_number() over(PARTITION BY datum,posta,analitika ORDER BY radnik) rbr,
alfa5, iznos,99,1,TO_DATE(SYSDATE),TO_CHAR(radnik),TO_CHAR(rbtran)
FROM TABLE_2@DB02 t
WHERE dnevnik=31
AND t.ind_ftp=0;
UPDATE TABLE_2@DB02
SET ind_ftp=1
WHERE dnevnik=31
AND ind_ftp=0;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END PROCEDURE_1;
/
As you see I use two database links DB01 and DB02. And commit is inside procedure.
|
|
|
|
|