Hi !
I am planning to have a scheudler job to refresh data from a SQL server database into Oracle. All I do is run several of the below statements. Each of these tables have less than 100 rows. So, it completes in under 20 seconds.
I am wondering if it is a good idea to run it as PL/SQL block as below. Please can someone comment ?
delete from B;
insert into A select * from AA@choumsq020;
commit;
delete from B;
insert into B select * from BB@choumsq020;
commit;
I am planning to run it as below
BEGIN
DBMS_SCHEDULER.create_schedule (
job_name => 'TEST'
job_type => 'PLSQL_BLOCK'
job_action => 'begin
delete from B;
insert into A select * from AA@choumsq020;
commit;
delete from B;
insert into B select * from BB@choumsq020;
commit;
end; '
start_date => SYSTIMESTAMP,
repeat_interval => 'FREQ=MINUTELY, byminute=15',
end_date => NULL,
comments => 'Repeats every 15 mins, for ever.');
END;
/
Am I doing anything wrong here ? I am yet to run it on the database
Thanks.