Database Reference
In-Depth Information
Usage Notes
This procedure has no effect when writing to the alert log with DBMS_SYSTEM.KSDWRT .
Examples
SQL> BEGIN
sys.dbms_system.ksdind(3);
sys.dbms_system.ksdwrt(1, 'indented string');
END;
/
The above anonymous block writes the following line to the trace file:
:::indented string
KSDWRT Procedure
This procedure writes a string to the SQL trace file of the server process servicing the database
client, the alert log of the instance, or both. If SQL_TRACE has not been enabled (through ALTER
SESSION , DBMS_SYSTEM , DBMS_SUPPORT, 1 etc.) in the server process and thus no trace file exists yet,
a trace file is created. Thus it is possible to write transcripts of sessions to trace files without
enabling SQL trace.
Syntax
DBMS_SYSTEM.KSDWRT(
dest IN BINARY_INTEGER,
tst IN VARCHAR2);
Parameters
Parameter
Description
dest
Destination file, 1=SQL trace file, 2=alert log, 3=both
tst
String to write to destination file
Usage Notes
When writing to a SQL trace file, a timestamp such as the one written by DBMS_SYSTEM.KSDDT is
automatically placed on the line preceding the string written, given that the session has been
inactive for more than ten seconds. To make sure the string written is always preceded by a
timestamp, explicitly call DBMS_SYSTEM.KSDDT before calling DBMS_SYSTEM.KSDWRT .
The package DBMS_SUPPORT may be installed with the script $ORACLE_HOME/rdbms/admin/dbmssupp.sql .
Tracing of a foreign session is initiated with the procedure START_TRACE_IN_SESSION and terminated
with the procedure STOP_TRACE_IN_SESSION .
1.
 
Search WWH ::




Custom Search