CREATE OR REPLACE procedure wwv_close_cursors ( p_num_cursors in number default 50 ) as c int := 0; begin ----------------- -- security check -- -- none required, secure method. -- for i in 1..p_num_cursors loop c := i; if dbms_sql.is_open(c) then dbms_sql.close_cursor(c); dbms_output.put_line('closing cursor "'||i||'"'); end if; end loop; end wwv_close_cursors; /