Wednesday, August 17, 2011

Compiling PL/SQL and Recompiling Dependent Objects

set echo on;
SELECT * FROM user_objects WHERE status = 'INVALID';
set echo off;

Prompt 
Prompt Compiling c:\dispatch_data_obj_body.sql
@c:\dispatch_data_obj_body.sql

Prompt 
Prompt Attempting to recompile any invalid objects 
exec sys.UTL_RECOMP.recomp_serial(schema => user);

set echo on;
Prompt 
SELECT * FROM user_objects WHERE status = 'INVALID';
set echo off;

No comments: