CLIENT_HOST global variable

This built-in global variable contains the host name of the current client, as returned by the operating system.

This global variable has the following characteristics:
  • It is read-only, with values maintained by system.
  • The type is VARCHAR(255).
  • The schema is SYSIBM.
  • The scope of this global variable is session.

If the client connection originated from an application running on the local system, the value of the variable is NULL. The database manager obtains the client IP address from the network when the connection is accepted. The client host name is obtained from the client IP address by invoking the TCP/IP GetAddrInfo function. If the processes did not originate from a remote system using TCP/IP, the value of the variable is NULL.