SQLNET trace including oci and thin driver

yuanqc發表於2014-07-08

1. Net Logging and Trace when it is oci driver

Logging

The following parameters can be set to configure Oracle Net logging in sqlnet.ora:

 

Parameter Description
LOG_DIRECTORY_CLIENT Specifies the directory for the client log file
LOG_FILE_CLIENT Specifies the name of the client log file
LOG_DIRECTORY_SERVER Specifies the directory for the server log file
LOG_FILE_SERVER Specifies the name of the server log file

By default both the client and server log file names default to sqlnet.log

Trace

The following parameters can be set to configure Oracle Net logging in sqlnet.ora:

 

Parameter Description
TRACE_DIRECTORY_CLIENT Specifies the directory for the client trace file
TRACE_FILE_CLIENT Specifies the name of the client trace file
TRACE_DIRECTORY_SERVER Specifies the directory for the server trace file
TRACE_FILE_SERVER Specifies the name of the server trace file
TRACE_FILELEN_CLIENT Specifies the size of each client trace file in kilobytes
TRACE_FILENO_CLIENT Specifies the number of client trace files
TRACE_FILELEN_SERVER Specifies the size of each server trace file in kilobytes
TRACE_FILENO_SERVER Specifies the number of server trace files
TRACE_LEVEL_CLIENT Specifies the level of detail for client trace
TRACE_LEVEL_SERVER Specifies the level of detail for server trace
TRACE_TIMESTAMP_CLIENT Includes a timestamp (to microseconds) for each event in the client trace
TRACE_TIMESTAMP_SERVER Includes a timestamp (to microseconds) for each event in the client trace
TRACE_UNIQUE_CLIENT Creates an individual client trace file for each process


2. Net Logging and Trace when it is thin driver

Doc ID 793415.1

The Oracle JDBC thin driver uses a java based implementation of  the SQLNET protocol (JavaNet layer).

Unlike the JDBC OCI driver, the SQLNET trace is not available with the JDBC thin driver at the client side for Oracle JDBC Driver versions < 11.2.  Therefore, to diagnose JDBC connection or other database related error conditions, only the SQLNET server side trace is available. As a result, it can be difficult to get a good understanding of the problem with only one end of the equation.

This article describes how to enable a similar sqlnet client trace with  the JDBC thin driver. This can be done by using a new utility (packaged as a JAVA jnettrace.jar library), the JavaNet utility, which allows tracing of  the JavaNet layer.

This utility,  attached to the article, is available on OTN:



參考:http://blogs.msdn.com/b/debarchan/archive/2010/07/06/how-to-enable-sql-net-client-side-tracing.aspx

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10973950/viewspace-1212390/,如需轉載,請註明出處,否則將追究法律責任。

相關文章