Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> USERENV('TERMINAL') returns NULL
Hi everyone.
First of all, the system:
We have a system Oracle 8.1.6 running on Windows NT 4 S.P.6. We also
have an interface (in Pro*C) connecting to it from Solaris via Net8
over TCP/IP.
Now, the problem:
I developed an audit system for capturing inputs, updates and deletes
in tables based upon triggers. Basically I insert each column
inserted, updated or deleted in a table into another table (audit)
with the same structure plus some columns as user, operation, etc...
One of these audit columns is the terminal, which I fill in with
USERENV('TERMINAL').
Suddenly I noticed that in certain circumstances, which I could not
determine yet, this USERENV('TERMINAL') is NULL (??). It happens when
the data modification is a result of a trigger. But this does not
happen all the times. We have two identical environments ('developing'
vs. 'test'), that are supposed to work in the same way, but in one of
then ('test') this value USERENV('TERMINAL') is NULL, whereas in the
other ('developing') it works fine returning the UNIX TTI value.
Anybody ever faced the same problem or has an idea about what the hell is happening?
Thanks in advance. Received on Fri Mar 22 2002 - 05:17:38 CST