Ip Address In Sys_context('Userenv','Ip_address') Has Leading Zeroes Removed 10.1.0.5 (Doc ID 370297.1)

Last updated on APRIL 24, 2017

Applies to:

Operating System Dependent Interface - Version: 10.1.0.5 to 10.2.0.3.1 - Release: 10.1 to
Operating System Dependent Interface - Version: 10.1.0.5 to 10.2.0.3.1   [Release: 10.1 to ]
IBM z/OS on System z
IBM z/OS (OS/390)
Listener Service joblog on zOS

Symptoms

SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM DUAL;

In previous releases the IP address contained zeros. After upgrade from
10.1.0.3 to 10.1.0.5 the zeros are truncated. So it gives the correct IP-Adress now.

The 10.1.0.5 net log shows the zeroes included.

JOBLOG from Netservice  (same in 10.1.* , 10.2.* , 9.2.*) :
--------------------------------------------------------------
MIN0733I Socket 0000 connected Subtask Kid1, IP 139.185.115.073
MIN0742I Socket 0000 closed Subtask Kid1, IP 139.185.115.073
-----> Ip addresses are not displayed correctly . The correct IP-Address would be 139.185.115.73

SYS_CONTEXT('USERENV','IP_ADDRESS')
------------------------------------------------------
Connect to 10.1.0.5 :
SYS_CONTEXT('USERENV','IP_ADDRESS')
139.185.115.73         ----> this the correct decimal address
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.5.2

SQL> Connected. (to 10.1.0.3)
SQL>
SYS_CONTEXT('USERENV','IP_ADDRESS')
139.185.115.073      ----->  this is not  correct decimal address - correct is would be 139.185.115.73
.

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