Databases Reference
In-Depth Information
Table 24-15. PL/SQL and OCI Interfaces for Instrumentation Entries
Trace File Entry
PL/SQL Interface
OCIAttrSet Attribute
ACTION NAME
DBMS_APPLICATION_INFO.SET_MODULE
DBMS_APPLICATION_INFO.SET_ACTION
OCI_ATTR_ACTION
OCI_ATTR_CLIENT_IDENTIFIER 6
CLIENT ID
DBMS_SESSION.SET_IDENTIFIER
MODULE NAME
DBMS_APPLICATION_INFO.SET_MODULE
OCI_ATTR_MODULE
When running code such as the following in SQL*Plus, all three types of instrumentation
entries are written to a trace file. 6
C:> sqlplus ndebes/ secret@ten_g.oradbpro.com
Connected.
SQL> BEGIN
dbms_application_info.set_module('mod', 'act');
dbms_session.set_identifier(sys_context('userenv','os_user') ||
'@' || sys_context('userenv','host') || ' (' ||
sys_context('userenv','ip_address') || ')' );
END;
/
PL/SQL procedure successfully completed.
SQL> ALTER SESSION SET sql_trace=TRUE;
Session altered.
The resulting trace file contains lines such as these:
*** ACTION NAME:(act) 2007-08-31 18:02:26.578
*** MODULE NAME:(mod) 2007-08-31 18:02:26.578
*** SERVICE NAME:(orcl.oradbpro.com) 2007-08-31 18:02:26.578
*** CLIENT ID:(DBSERVER\ndebes@WORKGROUP\DBSERVER (192.168.10.1)) 2007-08-31 18:02:2
6.578
*** SESSION ID:(149.21) 2007-08-31 18:02:26.578
The value orcl.oradbpro.com of SERVICE NAME stems from the use of this string as the
SERVICE_NAME in the definition of the Net service name ten_g.oradbpro.com .
These are the kinds of trace file entries that the Oracle10 g TRCSESS utility searches for
when used to extract relevant sections from one or more trace files. The sections that follow
provide additional detail on the individual entries. For detailed information on TRCSESS, see
Chapter 23.
6. DBMS_APPLICATION_INFO.SET_CLIENT_INFO and the OCI attribute OCI_ATTR_CLIENT_INFO set V$SESSION.
CLIENT_INFO . This setting is not emitted to trace files and cannot be used in conjunction with the
package DBMS_MONITOR .
Search WWH ::




Custom Search