Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

compile all schemas

WestDraytonDec 15 2010 — edited Dec 15 2010
Note that procedure "DBMS_UTILITY.COMPILE_SCHEMA" compiles only one given/input schema at a time, see description of it below.
But is there possibility for lazy people to compile all schemas? I don't see such procedure. Do i really have to give all the 20 schema names myself, and compile them one-by-one?

COMPILE_SCHEMA Procedure

This procedure compiles all procedures, functions, packages, and triggers in the specified schema.

Syntax

DBMS_UTILITY.COMPILE_SCHEMA (
   schema          VARCHAR2,
   compile_all     BOOLEAN DEFAULT TRUE,
   reuse_settings  BOOLEAN DEFAULT FALSE);

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_util.htm#i1002332
(Oracle 10g, Linux OS)


So is this the only solution:
/*
select q'(dbms_utility.compile_schema(schema=>')' || username || q'(');)' from dba_users
*/
BEGIN
  Dbms_Utility.Compile_Schema(SCHEMA => 'PUBLIC'); --copy paste others here
END;
Edited by: CharlesRoos on 15.12.2010 17:59
This post has been answered by Hoek on Dec 15 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2011
Added on Dec 15 2010
7 comments
3,512 views