Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> get the SQL that raised an error.

get the SQL that raised an error.

From: Youtz <youtz(_NO_SPAM)_at_hotmail.com>
Date: Wed, 8 Aug 2001 15:21:59 +0200
Message-ID: <9kreb8$m2q$1@news.worldcom.ch>

Hello,
I'ld like to get the command that raised an error to stock it in an alert table, I don't know which view or table to use for that, I tried with :

SELECT sql_text
  FROM v$sqltext
    WHERE (address, hash_value) IN

          (SELECT sql_address,
                            sql_hash_value
               FROM v$session
                   WHERE audsid = userenv('SESSIONID'))
                  order by piece;

But if I run that I get the select that I'm currently executing (SELECT sql_text FROM v$sqltext...).

How can I do to get the previouse command and not the current one or even better the exact one that raised an error ?

Thanks in advence,
Youtz. Received on Wed Aug 08 2001 - 08:21:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US