SYS_CONTEXT ('USERENV', 'IP_ADDRESS') Returns Hostname Rather Than Client IP (Doc ID 1267855.1)

Last updated on NOVEMBER 04, 2015

Applies to:

Oracle Server - Enterprise Edition - Version 11.2.0.1 to 11.2.0.2 [Release 11.2]
Information in this document applies to any platform.

***Checked for relevance on 27-Sep-2012***

Symptoms

When connecting to a 10.2.0.4 database through an 11.2.0.x listener, the following query returns the hostname of the database server when it should be returning the client ip address:


SQL> select sys_context( 'userenv', 'ip_address' ) from dual;

SYS_CONTEXT('USERENV','IP_ADDRESS')
--------------------------------------------------------------------------------
seclin4.ro.oracle.com



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms