SELECT 'ALTER PACKAGE '||do.owner||'.'||do.object_name|| ' COMPILE BODY ;'
FROM dba_objects do WHERE do.object_name LIKE '%' AND do.status='INVALID' AND do.object_type='PACKAGE BODY';
2.编译PACKAGE
ALTER PACKAGE APPS.HSS_API COMPILE PACKAGE ;
3.编译PACKAGE SPECIFICATION
ALTER PACKAGE APPS.HSS_API COMPILE SPECIFICATION ;
4.编译PACKAGE BODY
ALTER PACKAGE APPS.HSS_API COMPILE BODY ;
四.编译无效视图
1.查找无效视图
SELECT 'ALTER VIEW '||do.owner||'.'||do.object_name|| ' COMPILE;'
FROM dba_objects do WHERE do.object_name LIKE '%' AND do.status='INVALID' AND do.object_type='VIEW';