Compile_Schema procedure in dbms_utility package can be used to compile all the objects in a schema or only the invalid objects in a schema.
Syntax is:
DBMS_UTILITY.COMPILE_SCHEMA (
schema IN VARCHAR2,
compile_all IN BOOLEAN DEFAULT TRUE,
reuse_settings IN BOOLEAN DEFAULT FALSE);
If compile_all parameter is set as false, this procedure will compile only the invalid objects in the schema. Reuse_settings parameter is a boolean parameter to instruct oracle to reuse session settings for the objects compiled.Example usage:
This is an example usage to compile all invalid objects in HR schema:
BEGIN
DBMS_UTILITY.COMPILE_SCHEMA('HR',FALSE,TRUE);
END;
Regards,
Vijay
No comments :
Post a Comment