The execution of the following procedure is not working.
Hi experts.
The execution of the following procedure is not working.
Any clues?
CREATE OR REPLACE procedure SYSTEM.del1_dw_service_ord
ers is
CURSOR del1 is
select * from dw.dw_service_orders where to_char(transaction_date,'RR')='14' for update;
del1_rec dw.dw_service_orders%ROWTYPE;
BEGIN
execute immediate 'alter session enable parallel DML';
OPEN del1;
LOOP
fetch del1 into del1_rec;
exit when del1%NOTFOUND;
delete from dw.dw_service_orders where current of del1;
if del1%ROWCOUNT > 100
then
commit;
END IF;
END LOOP;
CLOSE del1;
commit;
END;
/
SQL> SQL> SQL> mapdbprd-oracle:/home/oracle/dba/scripts/Mapdb> cat del_dw_serv_orders.log