compile procedures
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: compile procedures

  1. #1
    Join Date
    Jun 2001
    Posts
    45
    How to compile all procedures in a database. what are the priviledges do we need for that.
    thanks

  2. #2
    Join Date
    Jan 2000
    Posts
    387
    Hi,

    The following sql will be able to list out the command to compile all the invalid procedures in your database. You will need to have alter procedure privileges.

    Hopes that this helps


    select decode( OBJECT_TYPE, 'PROCEDURE',
    'alter ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' compile;' )
    from dba_objects
    where STATUS = 'INVALID'
    and OBJECT_TYPE = 'PROCEDURE'
    and owner = 'ORCL'
    order by OWNER, OBJECT_TYPE, OBJECT_NAME;

  3. #3
    Join Date
    Feb 2001
    Posts
    125
    Hopes also this will do

    select 'Alter Procedure ' || OWNER||'.'||OBJECT_NAME || ' compile;'
    from dba_objects
    where STATUS = 'INVALID'
    and OBJECT_TYPE = 'PROCEDURE'
    and owner = 'ORCL'
    order by OWNER, OBJECT_NAME;


    Thanks
    P Soni

  4. #4
    Join Date
    Sep 2000
    Posts
    47
    Hey,

    What about DBMS_UTILITY.Compile_Schema(<>) .... ????


  5. #5
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Ask your DBA to run utlrcmp.sql or utlrp.sql from $ORACLE_HOME/rdbms/admin, which would recompile all the invalid procedures ....

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width