Hi Experts,
Oracle DB Version - 11g XE
I scheduled a job using dbms_scheduler which will insert a record into table T for each minute. I didnt mention COMMIT inside my procedure but records are being commited after each successful execution. How come it is possible.
Here is my code.
SQL> create table t ( empno number, creation_date date);
Table created
SQL> create or replace procedure test_proc
2 is
3
4 begin
5
6 insert into t values (1,sysdate);
7
8 end;
9 /
Procedure created
SQL> BEGIN
2 DBMS_SCHEDULER.CREATE_JOB (
3 job_name => 'test_job',
4 job_type => 'PLSQL_BLOCK',
5 job_action => 'BEGIN test_proc; END;',
6 start_date => cast(sysdate as timestamp with time zone),
7 repeat_interval => 'FREQ=MINUTELY',
8 end_date => cast(sysdate+1 as timestamp with time zone),
9 enabled => TRUE,
10 comments => 'insert record into table t');
11 END;
12 /
PL/SQL procedure successfully completed
SQL> select * from t;
EMPNO CREATION_DATE
---------- -------------
1 11/12/2013 11
1 11/12/2013 11
1 11/12/2013 11
1 11/12/2013 11
1 11/12/2013 12
1 11/12/2013 12
1 11/12/2013 12
1 11/12/2013 12
1 11/12/2013 12
9 rows selected
Cheers,
Suri