This discussion is archived
10 Replies Latest reply: Nov 19, 2012 1:15 AM by User448769-OC RSS

compiling valid objects

wins Newbie
Currently Being Moderated
Hi,

Will there be any problem when valid objects are recompilied.I use utlrp.sql to compile invalids.Does this script compile the valids objects too .

Regards
  • 1. Re: compiling valid objects
    Kamran Agayev A. Oracle ACE Director
    Currently Being Moderated
    utlrp.sql - Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/scripts.htm#sthref2848

    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]
  • 2. Re: compiling valid objects
    wins Newbie
    Currently Being Moderated
    Hi,

    Jus want to know if there is any issue if we compile valid objects.
  • 3. Re: compiling valid objects
    Kamran Agayev A. Oracle ACE Director
    Currently Being Moderated
    IMHO, there's no need to compile any VALID objects. Compilation is for INVALID objects only

    Also, you'll not get any error while compiling VALID objects once more

    SQL> create or replace procedure p
      2  is begin
      3  dbms_output.put_line('hello');
      4  end;
      5  /
    
    Procedure created.
    
    SQL> set serveroutput on
    SQL> exec p;
    hello
    
    PL/SQL procedure successfully completed.
    
    SQL> alter procedure p compile;
    
    Procedure altered.
    
    SQL>
    - - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

    Edited by: Kamran Agayev A. on May 19, 2009 11:30 AM
  • 4. Re: compiling valid objects
    SatishKandi Guru
    Currently Being Moderated
    If you try compiling a valid object, it might result in a lock (ORA-00054) in case that object is pinned (this is just a guess as I have not tested this myself).
  • 5. Re: compiling valid objects
    wins Newbie
    Currently Being Moderated
    Hi,

    Jus want to know if the below is true to some extent

    *Valid objects being re-compiled cause open sessions to raise errors.

    *It is also important to not re-compile a package specification when only the package body is invalid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  • 6. Re: compiling valid objects
    SatishKandi Guru
    Currently Being Moderated
    wins wrote:
    Hi,

    Jus want to know if the below is true to some extent

    *Valid objects being re-compiled cause open sessions to raise errors.
    I think this relates to what I have said in my earlier post but this does not clearly identify the errors that can occur.

    >
    *It is also important to not re-compile a package specification when only the package body is invalid.
    I don't see a point in this as no one can use an invalid object anyway.
  • 7. Re: compiling valid objects
    678145 Expert
    Currently Being Moderated
    Jus want to know if there is any issue if we compile valid objects.
    The biggest issue is totaly useless activity. There is absolutely no sense to compile a valid object.
    Instead of compiling valid objects go and make some tea, it will be more valuable :)
  • 8. Re: compiling valid objects
    Kamran Agayev A. Oracle ACE Director
    Currently Being Moderated
    Instead of compiling valid objects go and make some tea, it will be more valuable :)
    Ha ha haaaa.. Very good advice Laura! :)
  • 9. Re: compiling valid objects
    Aman.... Oracle ACE
    Currently Being Moderated
    Laura Gaigala wrote:
    Instead of compiling valid objects go and make some tea, it will be more valuable :)
    ROFL! That's truly more valuable!

    Aman....
  • 10. Re: compiling valid objects
    User448769-OC Newbie
    Currently Being Moderated
    There is indeed one case when you need to recompile valid objects: when you change the compilation method, i.e. from INTERPRETED to NATIVE for example.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points