Oracle Net Services - Tracing and Logging at a Glance
Oracle Net trace 用于跟踪或调试oracle连接故障,连接异常断开或者连接超时等情形,通过产生详细的跟踪信息来进行分析和诊断Oracle Net相关故障。关于这个网络调试主要是通过为相关的网络配置文件添加相关的参数来实现。MetaLink上ID 219968.1有详尽的描述。
一、Oracle trace的相关参数
TRACE_LEVEL_[CLIENT|SERVER|LISTENER] = [0-16|USER|ADMIN|SUPPORT|OFF]
TRACE_FILE_[CLIENT|SERVER|LISTENER] = <FILE NAME>
TRACE_DIRECTORY_[CLIENT|SERVER|LISTENER] = <DIRECTORY>
TRACE_UNIQUE_[CLIENT|SERVER|LISTENER] = [ON|TRUE|OFF|FALSE]
TRACE_TIMESTAMP_[CLIENT|SERVER|LISTENER] = [ON|TRUE|OFF|FALSE] #Oracle8i+
TRACE_FILELEN_[CLIENT|SERVER|LISTENER] = <SIZE in KB> #Oracle8i+
TRACE_FILENO_[CLIENT|SERVER|LISTENER] = <NUMBER> #Oracle8i+
LOG_FILE_[CLIENT|SERVER|LISTENER] = <FILE NAME>
LOG_DIRECTORY_[CLIENT|SERVER|LISTENER] = <DIRECTORY NAME>
LOGGING_LISTENER = [ON|OFF]
TNSPING.TRACE_LEVEL = [0-16|USER|ADMIN|SUPPORT|OFF]
TNSPING.TRACE_DIRECTORY = <DIRECTORY>
NAMES.TRACE_LEVEL = [0-16|USER|ADMIN|SUPPORT|OFF]
NAMES.TRACE_FILE = <FILE NAME>
NAMES.TRACE_DIRECTORY = <DIRECTORY>
NAMES.TRACE_UNIQUE = [ON|OFF]
NAMES.LOG_FILE = <FILE NAME>
NAMES.LOG_DIRECTORY = <DIRECTORY>
NAMES.LOG_UNIQUE = [ON|OFF]
NAMESCTL.TRACE_LEVEL = [0-16|USER|ADMIN|SUPPORT|OFF]
NAMESCTL.TRACE_FILE = <FILE NAME>
NAMESCTL.TRACE_DIRECTORY = <DIRECTORY>
NAMESCTL.TRACE_UNIQUE = [ON|OFF]NOTES ON TRACING 11g AND NEWER CLIENT/SERVER/LISTENER/CMAN
对于Oracle 11g,使用传统的Oracle net tracing时,必须添加下列参数
Sqlnet.ora file on either client or server:
DIAG_ADR_ENABLED=OFF
Listener.ora file:
DIAG_ADR_ENABLED_<listener_name>=OFF
CMAN.ORA:
DIAG_ADR_ENABLED=OFF
ADR_BASE=c:\your_directory