I have some trouble with SQL*Net. How does one produce a trace file?

SQL*Net client and server tracing can be enabled by setting parameters in the SQLNET.ORA file:

Client Side Tracing

Your SQLNET.ORA file should contain the following lines to produce a client side trace file:

trace_level_client = 10
trace_unique_client = on
trace_file_client = sqlnet.trc
trace_directory_client = <path_to_trace_dir>

Server Side Tracing

To enable server side tracing, use the following parameters:

trace_level_server = 10
trace_file_server = server.trc
trace_directory_server = <path_to_trace_dir>

Tracing TNSPING packets

Sometimes it is useful to only trace TNSPING packets. Add the following parameters to your SQLNET.ORA file:

TNSPING.TRACE_LEVEL = 4
TNSPING.TRACE_DIRECTORY = <path_to_trace_dir>

Tracing Levels

The follwoing values can be used for TRACE_LEVEL* prarameters:

  • 16 or SUPPORT - WorldWide Customer Support trace information
  • 10 or ADMIN - Administration trace information
  • 4 or USER - User trace information
  • 0 or OFF - no tracing, the default