1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Why Would Implicit Recompilation Be Turned Off?

Discussion in 'Server Administration and Options' started by EddieL, Apr 6, 2011.

  1. EddieL

    EddieL Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    We've been having some interesting behavior in some of our pl/sql deployments that I'd like to resolve. We will deploy new packages to our dev and test instances without any problem, even though deploying the new packages causes some invalid objects. Implicit recompilation just recompiles the objects on all our instances until, of course, we deploy to production. Our production server will not implicitly recompile objects. Instead, it returns invalid object errors.

    Why would this be? Is there a setting or a situation that turns implicit recompilation off?

    Thanks :)
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,351
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    I know of no 'implicit recompilation' for objects other than views that have been invalidated due to base table changes, and views are 'implicitly' recompiled only if the table changes did not affect columns used in the views. Please explain what you mean by 'implicit recompilation' and what object types are affected.
     
  3. EddieL

    EddieL Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    In Oracle, any invalid objects are recompiled "implicitly" by the server the first time they are used. This is working as expected on all our Oracle instances except Production. It just works. I can't find a way to turn it off, so I don't know why our production instance won't do it.
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,351
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    I have never experienced this except for views, although the documentation states this is possible:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/depend.htm#CNCPT018

    It may be that the dependency tree for your production database is different from dev and test; this cannot be 'turned off' as you state but it can be impeded because of dependency issues and/or invalid objects which cannot be successfully recompiled due to errors.
     
  5. EddieL

    EddieL Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    From oracle:

    “As background, when ORA-4068 (these are related to ORA-06508) is raised, Oracle will throw away all existing instantiations of the package. When the package (more properly, the subprogram referring to the package) is re-executed, Oracle will re-instantiate the package automatically (if possible), which typically will succeed, and re-execution of the subprogram will succeed.”
     
  6. EddieL

    EddieL Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    We're going to start executing a recompilation of the entire schema when we deploy our major applications. I'm just wondering why we're having to. :)
     
  7. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,351
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    Again, check your dependencies in production; it may be that due to a change in the dependency tree the automatic recompilation fails.
     
  8. prashant

    prashant Forum Advisor

    Messages:
    85
    Likes Received:
    7
    Trophy Points:
    160
    Location:
    New Delhi, India
    Hi Eddiel,

    Possibly I am posting a bit late. I would like to add following 2 points:-

    1) Compare remote_dependencies_mode parameter setting between test & production environments.
    2) A procedure/package will not compile while it is being executed, as a lock is acquired.

    Best Regards,
    Prashant