Re: Tracing TNS connection

From: Peter Fong <peter.fong_at_gmail.com>
Date: Thu, 14 Sep 2017 15:36:29 +1000
Message-ID: <CAFW8BRYW-hnSwG29jEkd_iZDYaV_v380D-gM+VaEGsazhq=1=g_at_mail.gmail.com>



933 comes under the parse failure bucket of ora errors. If you set the 10035 event it will generate a message in the alert log along with the invalid sql. It should be more lightweight than generating an errorstack.

SQL> alter system set events '10035 trace name context forever';

Session altered.

SQL> insert into z values (10,11,12,13) order by blah; insert into z values (10,11,12,13) order by blah

                                   *

ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> alter system set events '10035 trace name context off';

Session altered.

alert.log



Thu Sep 14 15:27:26 2017
PARSE ERROR: ospid=6669, error=933 for statement: insert into z values (10,11,12,13) order by blah

Regards

Peter

On Thu, Sep 14, 2017 at 2:14 AM, David Hicken <utahtoad_at_gmail.com> wrote:

> We have an COTS software that is sending a bogus SQL statement to the
> Oracle RDBMS (11.2.0.4). The error message (ORA-00933: SQL command not
> properly ended) doesn't give us a clue as to what is really wrong because
> it appears to be a data item rather than a syntax error. Because it appears
> to be a literal, it doesn't make any difference to the SQL area.
>
> Is there any way to "sniff" what the SQL is that comes through the TNS? I
> know of tracing, but I'm not sure how or at what level might catch this.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 14 2017 - 07:36:29 CEST

Original text of this message