恢復完提示無效物件

peng163fj發表於2015-04-13

批次重新編譯過程包體,過程等

SELECT 'ALTER ' || object_type || ' ' || owner || '.' || object_name ||
       ' COMPILE;'
FROM dba_objects
WHERE status <> 'VALID';


重編譯schema
execute utl_recomp.recomp_serial('SCOTT');


批次重新編譯同義詞

SELECT 'alter ' || decode(owner,
                          'PUBLIC',
                          'public synonym ',
                          'synonym ' || owner || '.') || object_name ||
       ' compile;'
FROM dba_objects
WHERE object_type = 'SYNONYM'
   AND status = 'INVALID';


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21302630/viewspace-1571537/,如需轉載,請註明出處,否則將追究法律責任。

相關文章