ALTER SESSION SET sql_trace = true;
You can also add an identifier to the trace file name for later identification:
ALTER SESSION SET SQL_TRACE=TRUE; ALTER SESSION SET TRACEFILE_IDENTIFIER=mysqltrace;
ALTER SESSION SET sql_tarce = false;
EXEC DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(sid, serial$, TRUE/FALSE);
Trace output is written to the database's UDUMP directory.
The default name for a trace files is INSTANCE_PID_ora_TRACEID.trc where:
The TKProf utility can be used to format trace output
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/60088/viewspace-891600/ ,如需转载,请注明出处,否则将追究法律责任。