Oracle7 Server Tuning

Contents Index Home Previous Next

Retrieving Application Information

Module and action names for a registered application can be retrieved by querying V$SQLAREA, or by calling the READ_MODULE procedure in the DBMS_APPLICATION_INFO package. Client information can be retrieved by querying the V$SESSION view, or by calling the READ_CLIENT_INFO procedure in the DBMS_APPLICATION_INFO package.

Querying V$SQLAREA

The following is a sample query illustrating the use of the MODULE and ACTION column of the V$SQLAREA.

SELECT sql_text, disk_reads, module, action 
	FROM v$sqlarea 
	WHERE module = 'add_employee';


SQL_TEXT  		 DISK_READS MODULE      	 ACTION 
------------------- ---------- ------------------ ----------------
INSERT INTO emp		  1 add_employee	insert into emp
(ename, empno, sal,
mgr, job, hiredate,
comm, deptno)
VALUES 
(name, 
next.emp_seq,
manager, title, 
SYSDATE, commission,
department)           

1 row selected.

READ_MODULE Syntax

The parameters for the READ_MODULE procedure are described in Table 3 - 5. The syntax for this procedure is shown below:

DBMS_APPLICATION_INFO.READ_MODULE(
				module_name	OUT	VARCHAR2,
				action_name	OUT	VARCHAR2)

Parameter Description
module_name The last value that the module name was set to by calling SET_MODULE.
action_name The last value that the action name was set to by calling SET_ACTION or SET_MODULE
Table 3 - 5. Parameters for READ_MODULE Procedure

READ_CLIENT_INFO Syntax

The parameter for the READ_CLIENT_INFO procedure is described in Table 3 - 6. The syntax for this procedure is shown below:

DBMS_APPLICATION_INFO.READ_CLIENT_INFO(client_info OUT VARCHAR2)

Parameter Description
client_info The last client information value supplied to the SET_CLIENT_INFO procedure.
Table 3 - 6. Parameters for READ_CLIENT_INFO Procedure


Contents Index Home Previous Next