DB2 Version 10.1 for Linux, UNIX, and Windows

MON_GET_APPLICATION_ID scalar function - Get connection application ID

The MON_GET_APPLICATION_ID scalar function returns the application ID of the invoking application. 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.

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

The schema is SYSPROC.

Authorization

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

Default PUBLIC privilege

In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.

Example

values sysproc.mon_get_application_id()

The following is an example of output from this query.

1                              
-------------------------------
*LOCAL.amurchis.110831180720