250: end loop;
251:
252: initjvmaux.rollbackset;
253:
254: dbms_output.put_line('delete from javaobj$');
255:
256: select count(*) into total_to_delete from javaobj$
257: where obj# in (select obj# from java$rmjvm$aux);
258: commit;
252: initjvmaux.rollbackset;
253:
254: dbms_output.put_line('delete from javaobj$');
255:
256: select count(*) into total_to_delete from javaobj$
257: where obj# in (select obj# from java$rmjvm$aux);
258: commit;
259: loop
260: dbms_output.put_line(total_to_delete ||' remaining at ' || to_char(sysdate,'mm-dd hh:mi:ss'));
258: commit;
259: loop
260: dbms_output.put_line(total_to_delete ||' remaining at ' || to_char(sysdate,'mm-dd hh:mi:ss'));
261: initjvmaux.rollbackset;
262: delete from javaobj$ where obj# in (select obj# from java$rmjvm$aux)
263: and rownum <= deletions_per_iteration;
264: commit;
265: exit when total_to_delete <= deletions_per_iteration;
266: total_to_delete := total_to_delete - deletions_per_iteration;
361: --
362: -- only delete from obj$ if all the java information was deleted
363: -- from the other tables correctly. Once we run this delete
364: -- there is no going back to remove the information from
365: -- syn$, objauth$, javaobj$, access$ and dependency$ using this script.
366: --
367: DECLARE
368: c1 number;
369: c2 number;
392: end if;
393:
394: select count(*) into c3 from objauth$ where obj# in
395: (select obj# from java$rmjvm$aux);
396: select count(*) into c6 from javaobj$ where obj# in
397: (select obj# from java$rmjvm$aux);
398: select count(*) into c5 from access$ where d_obj# in
399: (select obj# from java$rmjvm$aux);
400: