there is an application with tons of queries and one of them cause ORA-1722
To check: I turn trace on session like:
alter session set events '10046 trace name context forever, level 12'
and say to database
SELECT TO_NUMBER('asdf') FROM DUAL;
I actually receive ORA-1722 on the client side, but can't see that query finished with error code:
PARSING IN CURSOR #140193170131176 len=34 dep=0 uid=9 oct=3 lid=9 tim=24633865068083 hv=3356444932 ad='d25d6b00' sqlid='cmpv4d740yk84'SELECT TO_NUMBER('asdf') FROM DUALEND OF STMTPARSE #140193170131176:c=2315,e=2207,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=1388734953,tim=24633865068082EXEC #140193170131176:c=27,e=26,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=24633865068204WAIT #140193170131176: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=24633865068275FETCH #140193170131176:c=19,e=20,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=24633865068331STAT #140193170131176 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL (cr=0 pr=0 pw=0 str=1 time=1 us cost=2 size=0 card=1)'WAIT #140193170131176: nam='SQL*Net break/reset to client' ela= 3 driver id=1413697536 break?=1 p3=0 obj#=-1 tim=24633865068482WAIT #140193170131176: nam='SQL*Net break/reset to client' ela= 27988 driver id=1413697536 break?=0 p3=0 obj#=-1 tim=24633865096496WAIT #140193170131176: nam='SQL*Net message from client' ela= 537077 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=24633865633643CLOSE #140193170131176:c=8,e=9,dep=0,type=0,tim=24633865633723PARSE #140193170129200:c=32,e=32,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=0,tim=24633865633836BINDS #140193170129200: Bind#0 oacdty=01 mxl=32767(32767) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1400010 frm=01 csi=873 siz=32767 off=0 kxsbbbfp=7f8143f31000 bln=32767 avl=00 flg=05 Bind#1 oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00 oacflg=03 fl2=1400000 frm=01 csi=873 siz=24 off=0 kxsbbbfp=7f814424b060 bln=22 avl=00 flg=05WAIT #140193170129200: nam='SQL*Net message to client' ela= 1 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=24633865634181EXEC #140193170129200:c=336,e=336,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=24633865634210XCTEND rlbk=0, rd_only=1, tim=24633865634250
How to detect query that cause ORA-1722 (or any other logical/syntax issue)?