463: where ed.name = 'ORA$BASE' ) eusr
464: where obj.owner# = eusr.user#
465: and obj.type# not in (10, 0, 88)
466: and obj.remoteowner is null ) co
467: , dba_objects_ae oe /* old edition */
468: , dba_objects_ae re /* run edition */
469: , database_properties run /* run edition name */
470: where run.property_name = 'DEFAULT_EDITION'
471: /* run edition */
464: where obj.owner# = eusr.user#
465: and obj.type# not in (10, 0, 88)
466: and obj.remoteowner is null ) co
467: , dba_objects_ae oe /* old edition */
468: , dba_objects_ae re /* run edition */
469: , database_properties run /* run edition name */
470: where run.property_name = 'DEFAULT_EDITION'
471: /* run edition */
472: and re.owner = 'SYS'
483: 'PACKAGE', 'PACKAGE BODY', 'TYPE', 'TYPE BODY',
484: 'PROCEDURE', 'FUNCTION', 'TRIGGER') /* editioned type */
485: and exists
486: ( select null
487: from dba_objects_ae ro /* replacement object */
488: , dba_objects_ae ne /* newer edition */
489: where ro.owner = co.owner
490: and ro.object_type in (co.object_type, 'NON-EXISTENT')
491: and ro.object_name = co.object_name
484: 'PROCEDURE', 'FUNCTION', 'TRIGGER') /* editioned type */
485: and exists
486: ( select null
487: from dba_objects_ae ro /* replacement object */
488: , dba_objects_ae ne /* newer edition */
489: where ro.owner = co.owner
490: and ro.object_type in (co.object_type, 'NON-EXISTENT')
491: and ro.object_name = co.object_name
492: and ro.namespace = co.namespace
650: for erec in c_old_editions loop
651: -- test if edition is empty of objects
652: begin
653: select 'N' into l_empty
654: from dba_objects_ae obj
655: where obj.edition_name = erec.edition_name
656: and obj.object_type <> 'NON-EXISTENT'
657: and rownum = 1;
658: exception
974: 'alter system kill session '||''''||s.sid||','||s.serial#||'''' kill
975: from
976: v$session s
977: , v$process p
978: , dba_objects_ae e
979: where s.type <> 'BACKGROUND'
980: and p.addr = s.paddr
981: and e.object_id = s.session_edition_id
982: and e.object_name = ad_zd.get_edition(x_edition_type)