DB2 Version 9.7 for Linux, UNIX, and Windows

APPLICATION_ID scalar function

The APPLICATION_ID function returns the application ID of the current connection. The data type of the result is VARCHAR(128).

The value returned by the function is unique within a 100-year interval and valid only for the duration of the connection established before calling the function.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-APPLICATION_ID--(--)----------------------------------------><

The schema is SYSFUN.

Authorization

One of the following authorities is required to execute the function:
  • EXECUTE privilege on the function
  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

Example

SELECT APPLICATION_ID() AS APPL_ID FROM SYSIBM.SYSDUMMY1