1 2 3 4 5 6 7 8 9 10 11 |
invalid -> vaild 상태 변경 한 방 SQL SELECT distinct 'ALTER '||OBJECT_TYPE||' '||OWNER||'.'|| OBJECT_NAME || ' COMPILE ;' as comp_command FROM DBA_OBJECTS WHERE STATUS = 'INVALID' and Object_Type not in ( 'PACKAGE BODY','SYNONYM') union SELECT distinct 'ALTER PACKAGE ' ||OWNER||'.'|| OBJECT_NAME || ' COMPILE BODY;' as comp_command FROM DBA_OBJECTS WHERE STATUS = 'INVALID' and Object_Type in ( 'PACKAGE BODY') ; |