Dear Friends,
I have an issue in SYS_CONTEXT function. If I run the SYS_CONTEXT function SQL query in SQL PLUS and SQL Developer Tool, the values are showing differently in both the tools.
CASE 1: In SQL Developer Tool,
SQL> SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') from dual;
SYS_CONTEXT('USERENV','IP_ADDRESS')
-------------------------------------------------------------------
10.1.118.101
SQL> SELECT SYS_CONTEXT('USERENV','OS_USER') from dual;
SYS_CONTEXT('USERENV','OS_USER')
--------------------------------------------------------------
Administrator
CASE 2: In SQL * PLUS Tool,
SQL> SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') from dual;
SYS_CONTEXT('USERENV','IP_ADDRESS')
-------------------------------------------------------------------
192.168.12.164
SQL> SELECT SYS_CONTEXT('USERENV','OS_USER') from dual;
SYS_CONTEXT('USERENV','OS_USER')
--------------------------------------------------------------
Oracle
Important Details
OS Login User: Administrator
DB Connect User: Oracle
Server IP Address: 192.168.12.164
System IP Address: 10.1.118.101
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
I am using the same queries in both the tools, but the output is coming differently, Can you help me to solve the issue.
Thanks