PL/SQL package gets invalidated seemingly at random

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Javier Sanchez

    PL/SQL package gets invalidated seemingly at random

    Hi all,
    I am experiencing a problem whereby a PL/SQL package is valid for
    some time (and runs succesfully a few times) and then suddenly becomes
    invalid in DB. If I recompile this package it works again for some
    time and then again gets invalidated. Does anyone have a suggestion or
    idea of what might cause such strange behavior?

    Also, does anyone know a way of obtaining error information from DB
    that reports why a package was flagged as invalid?
    Finally, I would appreciate help on how to obtain dependencies (both
    direct and indirect) for a package? (I read in the documentation that
    a change in a dependency can cause a package to be invalid)

    Thanks for your help, regards,

    -Javier
  • Mark C. Stock

    #2
    Re: PL/SQL package gets invalidated seemingly at random


    "Javier Sanchez" <javier_nicolas _sanchez@hotmai l.comwrote in message
    news:975c1541.0 401091432.1f34c 849@posting.goo gle.com...
    | Hi all,
    | I am experiencing a problem whereby a PL/SQL package is valid for
    | some time (and runs succesfully a few times) and then suddenly becomes
    | invalid in DB. If I recompile this package it works again for some
    | time and then again gets invalidated. Does anyone have a suggestion or
    | idea of what might cause such strange behavior?
    |
    | Also, does anyone know a way of obtaining error information from DB
    | that reports why a package was flagged as invalid?
    | Finally, I would appreciate help on how to obtain dependencies (both
    | direct and indirect) for a package? (I read in the documentation that
    | a change in a dependency can cause a package to be invalid)
    |
    | Thanks for your help, regards,
    |
    | -Javier


    a change in dependencies is the typical reason

    use the data dictionary view USER_DEPENDENCI ES or DBA_DEPENDENCIE S to
    (recursively) examine objects that a package depends on

    whenever possible, avoid making changes to the package specification -- only
    work with the package body, this reduces invalidation of dependent packages
    and procedures

    -- mcs


    Comment

    • babu

      #3
      Re: PL/SQL package gets invalidated seemingly at random

      You can try setting the dependencies_mo de from time_stamp to signature.

      Babu
      "Mark C. Stock" <mcstockX@Xenqu ery .comwrote in message
      news:8uWdnQWrp-423GKiRVn-ug@comcast.com. ..
      >
      "Javier Sanchez" <javier_nicolas _sanchez@hotmai l.comwrote in message
      news:975c1541.0 401091432.1f34c 849@posting.goo gle.com...
      | Hi all,
      | I am experiencing a problem whereby a PL/SQL package is valid for
      | some time (and runs succesfully a few times) and then suddenly becomes
      | invalid in DB. If I recompile this package it works again for some
      | time and then again gets invalidated. Does anyone have a suggestion or
      | idea of what might cause such strange behavior?
      |
      | Also, does anyone know a way of obtaining error information from DB
      | that reports why a package was flagged as invalid?
      | Finally, I would appreciate help on how to obtain dependencies (both
      | direct and indirect) for a package? (I read in the documentation that
      | a change in a dependency can cause a package to be invalid)
      |
      | Thanks for your help, regards,
      |
      | -Javier
      >
      >
      a change in dependencies is the typical reason
      >
      use the data dictionary view USER_DEPENDENCI ES or DBA_DEPENDENCIE S to
      (recursively) examine objects that a package depends on
      >
      whenever possible, avoid making changes to the package specification --
      only
      work with the package body, this reduces invalidation of dependent
      packages
      and procedures
      >
      -- mcs
      >
      >

      Comment

      • Kev

        #4
        Re: PL/SQL package gets invalidated seemingly at random

        The reason for the package becoming invaild should be logged into the
        v$errors table as well.


        "babu" <babu@insightbb .comwrote in message
        news:B8gMb.2583 8$nt4.49443@att bi_s51...
        You can try setting the dependencies_mo de from time_stamp to signature.
        >
        Babu
        "Mark C. Stock" <mcstockX@Xenqu ery .comwrote in message
        news:8uWdnQWrp-423GKiRVn-ug@comcast.com. ..

        "Javier Sanchez" <javier_nicolas _sanchez@hotmai l.comwrote in message
        news:975c1541.0 401091432.1f34c 849@posting.goo gle.com...
        | Hi all,
        | I am experiencing a problem whereby a PL/SQL package is valid for
        | some time (and runs succesfully a few times) and then suddenly becomes
        | invalid in DB. If I recompile this package it works again for some
        | time and then again gets invalidated. Does anyone have a suggestion or
        | idea of what might cause such strange behavior?
        |
        | Also, does anyone know a way of obtaining error information from DB
        | that reports why a package was flagged as invalid?
        | Finally, I would appreciate help on how to obtain dependencies (both
        | direct and indirect) for a package? (I read in the documentation that
        | a change in a dependency can cause a package to be invalid)
        |
        | Thanks for your help, regards,
        |
        | -Javier


        a change in dependencies is the typical reason

        use the data dictionary view USER_DEPENDENCI ES or DBA_DEPENDENCIE S to
        (recursively) examine objects that a package depends on

        whenever possible, avoid making changes to the package specification --
        only
        work with the package body, this reduces invalidation of dependent
        packages
        and procedures

        -- mcs
        >
        >

        Comment

        Working...