<$BlogRSDUrl$>

Wednesday, June 16, 2004

Larry Wolfson pointed out to me a potentially rather serious problem with the after servererror trigger to trap system events that I posted recently. In the case for which the trigger is designed, I am trying to obtain the sql statement that causes a particular server error. It doesn't take a great deal of thought to realize that one could in principle extend the trigger to log all server errors. This raises the question - what happens if there is no sqltext associated with the error - for example 1017 on failed login. What we would probably like to happen is for the statement to be a null string. This is what happens on 9205


UTILS 16-JUN-2004 08:49@oranet>insert into monitored_errors values(1017);

1 row created.

UTILS 16-JUN-2004 08:49@oranet>commit;

Commit complete.

UTILS 16-JUN-2004 08:49@oranet>conn niall/peter
ERROR:
ORA-03113: end-of-file on communication channel

Warning: You are no longer connected to ORACLE.


This is bug 3124081 which is fixed in 10g. The fix doesn't obviate the need for error handling if you want to trap all errors - but it does give you that possibility. For completeness on 10g you get the following with the trigger as is.


UTILS 16-JUN-2004 09:53@nl1010>conn peter/rabbit
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 19
ORA-01017: invalid username/password; logon denied


Warning: You are no longer connected to ORACLE.
16-JUN-2004 09:53@>



0 Comments
0 Comments: Post a Comment