Set Log_Trace Statement--Trace Log Writes
You can use the LOG_TRACE option of the SET statement to start and stop tracing of log file writes. Using this option requires the trace privilege.
IMPORTANT! Do not use set log_trace alone as a debugging or tracing tool. Do not base applications on set log_trace output because it is not guaranteed to remain the same across releases. The support of set log_trace is not guaranteed in this or future releases.
To start tracing log writes, issue the following statement:
set log_trace;
To stop tracing log writes, issue the following statement:
set nolog_trace;
When you use SET LOG_TRACE during a session, you receive a list of the log records written during execution of your query, along with other information about the log. SET LOG_TRACE output includes:
• The length of the log and the amount of space reserved for its CLR. For more information on CLRs, see
Log Space Reservation.
• Whether the log write is a normal log record (do/redo) or a CLR.
• Whether the log record can be copied to the journal file.
• Whether the log is associated with a special recovery action.
Last modified date: 04/03/2024