Technology Network Community
Oracle Database
Fusion Middleware
Development Tools
Server & Storage Systems
Enterprise Management
Berkeley DB Family
Cloud Computing
Big Data
Business Intelligence
Migration and Modernization
E-Business Suite
PeopleSoft Enterprise
JD Edwards World
JD Edwards EnterpriseOne
User Productivity Kit Pro (UPK) and Tutor
Governance, Risk & Compliance (GRC)
Master Data Management (MDM)
Oracle CRM On Demand
On Demand: SaaS and Managed Applications
AutoVue Enterprise Visualization
Agile PLM
Endeca Experience Management
Fusion Applications
Archived Forums



General Questions

USERENV('TERMINAL') returns null

Hello All,  I use the above function in auditing the activity on the server. It used to return proper machine name but now it returns null. I also tried select SYS_CONTEXT('USERENV','TERMINAL') terminal from dual; but it also returns null.  The following call select SYS_CONTEXT('USERENV','IP_ADDRESS') terminal from dual; does return the correct IP address.  Does anybody know why I might have suddenly stopped getting the terminal id ?  TIA,  --SP

Sp, What version of the Oracle rdbms is in use? What version of the client is in use? How many, if any, of the sessions are batch processes? How many, if any, are session created to support remote access via database links to local objects?  I have several that have no terminal values but that do have a program.  I have a lot more session that have no program value but do show a terminal.  Most are batch programs or due to linked access.  The rest are probably due to bugs in the client softeware.  IMHO -- Mark D Powell --

Its a straight forward connect to the oracle server and run the select query in sqlplus. Nobody else is connected to the database. The DB and client both are   SQL*Plus: Release - Production on Thu Nov 17 17:15:54 2005  Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.  Connected to: Oracle9i Enterprise Edition Release - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release - Production  SQL> select USERENV('TERMINAL') from sys.dual;  USERENV('TERMINA   SQL>

Using a telnet session on my UNIX box I get a terminal for the client.  Connecting from my PC using an 8.1.7 client I get a terminal value.  Using a client on my PC I also get a terminal (matches 8.1.7).  I have to believe it is a client version specific and perhaps also platform specific problem.  Maybe someone running will see the thread and test.  I think you choices are to check metalink for a known bug and possible patch or to upgrade to a version where the problem is fixed.  HTH -- Mark D Powell --

This is likely due to Bug:3325701 " V$SESSION.TERMINAL IS NULL IN" which is fixed in release and Bug:3135311 " Wrong results from SYS_CONTEXT('userenv', 'terminal')"  For more information see MetaLink Note:275908.1

Related Links

Users tablespace - datafile is 24.5 GB, only 1.2Gb used - What should I Do?
Audit table and email me
Oracle tnsping alerts
password expiry
Database not open
TKPROF prob in generating EXPLAIN PLAN
sql plan changes
It it necessary to kill the locks
Restore question
Movement of data over dblink using DBMS_PARALLEL_EXECUTE package
Table Fragmentation ?
sql*plus upgrade
How to set SGA Parameter while creating DB...
Index fragmentation percentage.
DRCP connection failing
secondary Indexes on IOT