When I execute this stored procedure:
create or replace procedure "delete-archive"
is
begin
for i in (select * from table(RDSADMIN.RDS_FILE_UTIL.LISTDIR('DATA_PUMP_DIR'))
where FILENAME like 'JDE%')
loop
UTL_FILE.FREMOVE ('DATA_PUMP_DIR', i.filename );
end loop;
end;
I get this error:
8/40 PLS-00364: loop index variable 'I' use is invalid
The owner has execute permission. It was like that GRANT DBA TO pqp;
. Do you think that the problem may be permissions?