Help: How can I find the error in a Procedure programtically

Ask a Question related to Oracle Server, Design and Development.

  1. #1

    Default Help: How can I find the error in a Procedure programtically

    We have a procdure. Every night it will become invalid, but it will be
    recompiled automatically by our scripts. There is no bad influence on our
    production, so this problem was unattended for a long time.

    I am interested in writing a scripts, which will record why the procedure is
    invalid.

    Could some one tell me which dynamic view I should look to get the error
    message if a procedure becomes invalid?

    Your help is highly appreciated.


    charlie cs Guest

  2. Similar Questions and Discussions

    1. Printing programtically
      I am trying to print from my plugin without throwing up the Print dialog, but it is not working. I am using the AVDocPrintPagesWithParams API call...
    2. CFGRID row highlight programtically
      Can you programatically set a row to be highlighted in a CFGRID? I want to have the first row selected every time the form is loaded so as to...
    3. Stored procedure error
      We are attempting to use a stored procedure to enter data into two tables and we are recieving this error: ADODB.Command error '800a0d5d' ...
    4. Asp using the Oracle procedure call error
      My system is on a NT4 (w/SP6a) running IIS 4. I am developing a page that query one record from my Oracle DB 8.1.6 on a separate machine. I am...
    5. C stored procedure SQL error.
      I have a very basic C stored procedure written. It was working fine with some bogus/kludge SQL (just to get a DBRM created). I have now added...
  3. #2

    Default Re: How can I find the error in a Procedure programtically


    "charlie cs" <cs3526(no spam)@yahoo.com> wrote in message
    news:A3yMa.9186$tw3.7756@nwrdny02.gnilink.net...
    > We have a procdure. Every night it will become invalid, but it will be
    > recompiled automatically by our scripts. There is no bad influence on our
    > production, so this problem was unattended for a long time.
    >
    > I am interested in writing a scripts, which will record why the procedure
    is
    > invalid.
    >
    > Could some one tell me which dynamic view I should look to get the error
    > message if a procedure becomes invalid?
    >
    > Your help is highly appreciated.
    >
    >
    Try looking in user_errors / all_errors / dba_errors to see if it provides a
    clue.
    .... and next time, please post the Oracle version.

    Anurag


    Anurag Varma Guest

  4. #3

    Default Re: Help: How can I find the error in a Procedure programtically

    It may not have been any error that caused your stored proc to go
    INVALID. Rather, it may be DDL statements on an underlying object which
    makes the stored proc go INVALID. The next time the stored proc gets
    accessed, it is recompiled and everything goes fine. Check the
    LAST_DDL_TIME of DBA_OBJECTS for those objects that the stored proc
    uses.

    HTH,
    Brian

    charlie cs wrote:
    >
    > We have a procdure. Every night it will become invalid, but it will be
    > recompiled automatically by our scripts. There is no bad influence on our
    > production, so this problem was unattended for a long time.
    >
    > I am interested in writing a scripts, which will record why the procedure is
    > invalid.
    >
    > Could some one tell me which dynamic view I should look to get the error
    > message if a procedure becomes invalid?
    >
    > Your help is highly appreciated.
    --
    ================================================== =================

    Brian Peasland
    [email]oracle_dba@remove_spam.peasland.com[/email]

    Remove the "remove_spam." from the email address to email me.


    "I can give it to you cheap, quick, and good. Now pick two out of
    the three"
    Brian Peasland Guest

  5. #4

    Default Re: Help: How can I find the error in a Procedure programtically

    I looked at bit around to find what you're looking for, and it seems
    to me that this info isn't stored by Oracle. At least not in the
    dynamic views (the V$ and its underlying tables such as sys.error$,
    sys.obj$, ...). The only place left to check for this info is the
    fixed tables (get the list from v$fixed_tables to see the list if
    you're interested). You can see the procedure's dependencies in
    USER(DBA)_DEPENDENCIES, which might be useful to you. This is what
    Oracle uses internally (or I sould say sys.dependency$) to decide
    which objects to invalidate when an underlying object is altered. Hope
    that helps a bit.

    Daniel
    > We have a procdure. Every night it will become invalid, but it will be
    > recompiled automatically by our scripts. There is no bad influence on our
    > production, so this problem was unattended for a long time.
    >
    > I am interested in writing a scripts, which will record why the procedure is
    > invalid.
    >
    > Could some one tell me which dynamic view I should look to get the error
    > message if a procedure becomes invalid?
    >
    > Your help is highly appreciated.
    Daniel Roy Guest

  6. #5

    Default Re: Help: How can I find the error in a Procedure programtically

    "charlie cs" <cs3526(no spam)@yahoo.com> wrote in message news:<A3yMa.9186$tw3.7756@nwrdny02.gnilink.net>...
    > We have a procdure. Every night it will become invalid, but it will be
    > recompiled automatically by our scripts. There is no bad influence on our
    > production, so this problem was unattended for a long time.
    >
    > I am interested in writing a scripts, which will record why the procedure is
    > invalid.
    >
    > Could some one tell me which dynamic view I should look to get the error
    > message if a procedure becomes invalid?
    >
    > Your help is highly appreciated.
    Hi,
    When a procedure becomes invalid it doesn't produce an error message.
    Often it's a case of a change to an object on which the procedure
    depends. You say that it becomes invalid every night..perhaps
    something on which the procedure depends is being changed in a nightly
    script? You may be able to track this down using these views:
    DBA_DEPENDENCIES
    USER_DEPENDENCIES
    ALL_DEPENDENCIES

    I hope this is of some help,

    Steve
    Stephen_CA Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139