Search 800 + Posts

Jan 18, 2016

Script to Compile Invalid Objects in a Schema


Below is Script to Compile Invalid objects in a Schema ( example XXBIZ)

declare
cursor invalid_objects is
 select object_name, object_type
  from user_objects
where object_type in ('PACKAGE', 'PACKAGE BODY')
    and status = 'INVALID'
    and object_name like 'XXBIZ%';
begin
 for rec in invalid_objects
    loop
        DBMS_DDL.ALTER_COMPILE (rec.object_type ,'XXBIZ' ,rec.object_name);
    end loop;
end;

No comments:

Post a Comment