I would go after the IP_ADDRESS of the offending machine and find out
who/what is causing the problem. You should be able to get this either
using SYS_CONTEXT or setting "log_status=on" at the tns listener level.
Watch your listener log file for entries where PROGRAM=<the suspected
program>, get the IP address and track them down.
However, if you use either:
the resulting integer can be matched to a session with v$session.audsid.
Quote:> I have a program that constantly connects to the database and hangs
> for the database. It is using JDBC client, so all information in
> V$SESSION is non-specific (there is no terminal, os_user or any other
> fields). It is also using generic user name that other programs use.
> All I have to go by is the external program name (it says ORACLE.EXE
> (P001)). I wanted to come up with the after logon trigger that would
> disconnect session with such a program name.
> However, in the userenv there is no program name attribure, there is
> also no sessionid so that I can reference V$SESSION.
> ANy ideas on how I can do that?
I've got two questions I'd appreciate help with...
(1) If / how, using JDBC, can one set the value that appears in sp_who2's
(2) If / how, using JDBC, can one detect that a stored procedure invocation
in JDBC was terminated using T-SQL's "KILL <spid>" command?
Thanks in advance,