Hi,
How can I delete the data from apex_mail_queue using dbms_scheduler?
I am trying this for creation of job-
begin
dbms_scheduler.create_job (
job_name => ‘xyz’,
job_type => ‘STORED_PROCEDURE’,
job_action => ‘rescheduler’,
start_date => SYSTIMESTAMP,
repeat_interval => ‘FREQ=MINUTELY; INTERVAL=30’,
enabled => TRUE,
auto_drop => FALSE);
END;
and for preocedure-
CREATE OR REPLACE PROCEDURE rescheduler
AS
BEGIN
insert into dummy_mail
select * from apex_mail_queue;
delete from apex_mail_queue;
END;
Data inserted in the dummy_mail table but not deleted from apex_mail_queue.
Please help me regarding this.