Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue in SYS_CONTEXT function

user11322744Dec 26 2013 — edited Dec 27 2013

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2014
Added on Dec 26 2013
5 comments
1,030 views