DBMS_SCHEDULER.CREATE_JOB PROBLEM
644638Jun 12 2008 — edited Jun 12 2008Hi,
I have a big problem.
I present hole situation:
create package:
create or replace package Variables
as
numer number:=0;
end Variables;
/
create relation (table):
create table test1(
id number,
when timestamp
);
I create a job:
begin
DBMS_SCHEDULER.create_job (
job_name => 'every_time',
job_type => 'PLSQL_BLOCK',
job_action => 'begin
Variables.numer:=10;
insert into test1 values(1, current_timestamp);
Variables.numer:=20;
insert into test1 values(2, current_timestamp);
Variables.numer:=30;
insert into test1 values(3, current_timestamp);
end;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=SECONDLY;INTERVAL=30',
--end_date => SYSTIMESTAMP + (1/24),
enabled => TRUE);
end;
/
This job execute twice for a minute. when it is execute the situations looks that:
select * from test1;
1 08/06/12 09:49:44,500000000
2 08/06/12 09:49:44,500000000
3 08/06/12 09:49:44,500000000
BEGIN
DBMS_OUTPUT.PUT_LINE('numer=' ||Variables.numer);
END;
/
anonymous block completed
numer=0
I do not understand. Operations DML are pass through but there is not none change in value package... Where is it a problem? What am I doing wrong?
I tried also write a schema name but it did not help.
Please help me....
Sorry for my English