DBMS_APPLICATION_INFO Interface

This section describes all the programs available in the DBMS_APPLICATION_INFO package.

The DBMS_APPLICATION_INFO.READ_CLIENT_INFO procedure

The READ_CLIENT_INFO procedure returns the currently registered client information for the session. The program header is,

PROCEDURE DBMS_APPLICATION_INFO.READ_CLIENT_INFO
    (client_info OUT VARCHAR2);

where the client_info parameter contains the client information currently registered in V$SESSION.

The program does not raise any exceptions, nor does it assert a purity level with the RESTRICT_REFERENCES pragma.

Example

The following function calls DBMS_APPLICATION_INFO.READ_CLIENT_INFO and returns the client information. This function is part of the register_app package discussed in Section 7.3 later in this chapter.

FUNCTION current_client_info RETURN VARCHAR2
IS
   /*
   || calls DBMS_APPLICATION_INFO.READ_CLIENT_INFO
   || and returns the client info 
   */
temp_client_info VARCHAR2(64);

BEGIN
   SYS.DBMS_APPLICATION_INFO.READ_CLIENT_INFO
      (temp_client_info);

   RETURN temp_client_info;
END current_client_info;

In this example, I have fully qualified the package name with the package owner (SYS), insuring that the SYS version of the package is called. This is not normally necessary, as there is (usually) a public synonym pointing to SYS.DBMS_APPLICATION_INFO. The reason for using a fully qualified reference in this specific case is discussed in Section 7.3.6.

The DBMS_APPLICATION_INFO.READ_MODULE procedure

The READ_MODULE procedure ...

Get Oracle Built-in Packages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.