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

(Doc ID 1267855.1)

Last updated on MARCH 16, 2018

Applies to:

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

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


When connecting to a 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;



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