1. Net Logging and Trace when it is oci driver
http://docs.oracle.com/cd/A57673_01/DOC/net/doc/NWTR23/ch3trc.htm
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://www.oracle.com/technetwork/database/enterprise-edition/jnettrace.jar
参考: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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10973950/viewspace-1212390/