🍅Recompile Object Invalid on Oracle
Get Started
sqlplus / as sysdbaSolution 1 ( กรณีที่มี Object Invalid ไม่เยอะ )
select object_name, status from dba_objects where object_type = 'VIEW' and status = 'INVALID' ;alter view view_name compile ;Solution 2 ( กรณีที่มี Object Invalid เยอะ )
spool script.sql select ' alter view ' || object_name || ' compile ' from dba_objects where object_type = 'VIEW' and status like 'INVALID' ;vi script.sqlalter view view_name compile ;
alter view view_name compile ;
alter view view_name compile ;Last updated