当前位置: DBARoad > 基础知识 > 文章正文

如何对listener进行跟踪

                    作者 :OoNiceDream【转载时请务必以超链接形式标明文章原始出处和作者信息】
                    链接:http://www.dbaroad.me/archives/2010/01/listener_trace.html

对listener进行跟踪,产生trace文件,是诊断listener问题不错的手段。可以在listener.ora中添加以下内容来进行跟踪:

TRACE_LEVEL_LISTENER_T = 16
TRACE_FILE_LISTENER_T = LISTENER.TRC
TRACE_DIRECTORY_LISTENER_T = /app/oracle/product/9205/network/admin
TRACE_TIMESTAMP_LISTENER_T = ON


“LISTENER_T”是listenerd name,各个参数含义如下:

TRACE_LEVEL_LISTENER       批定TRACE级别
TRACE_FILE_LISTENER        指定TRACE文件名称
TRACE_DIRECTORY_LISTENER   指定TRACE文件目录
TRACE_TIMESTAMP_LISTENER   指定是否在TRACE文件中添加时间戳

启动监听时,就可以看到生成的TRACE文件了(Listener Trace File):

STATUS of the LISTENER
------------------------
Alias                     listener_t
Version                   TNSLSNR for HPUX: Version 9.2.0.8.0 - Production
Start Date                31-OCT-2009 16:31:07
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               support
Security                  OFF
SNMP                      OFF
Listener Parameter File   /app/oracle/product/9205/network/admin/listener.ora
Listener Log File         /app/oracle/product/9205/network/log/listener_t.log
Listener Trace File       /app/oracle/product/9205/network/admin/listener.trc

这些参数中,最重要的TRACE_LEVEL_LISTENER,其它参数按照默认设置就可以了。要生成TRACE,最简单的设置如下:

TRACE_LEVEL_LISTENER_T = 6

默认情况下,TRACE文件就会生到:

Listener Trace File       /app/oracle/product/9205/network/trace/listener_t.trc

TRACE_LEVEL_LISTENER设定的level可以是从0-16,level越高,生成的信息越多,默认是0,也就是不生成TRACE。另外一些level还可以用相应的英文字符代替:

OFF (equivalent to 0) disabled - provides no tracing.
USER (equivalent to 4) traces to identify user-induced error conditions.
ADMIN (equivalent to 6) traces to identify installation-specific problems.
SUPPORT (equivalent to 16) trace information required by OSS for troubleshooting.

例如:

TRACE_LEVEL_LISTENER_T = admin

— The End —

关键字:
喜欢DBARoad的文章,那就通过 RSS Feed 功能订阅阅读吧!

我要评论

*

* 绝不会泄露


  • 订阅


      抓虾
      google reader
      my yahoo
      bloglines
      鲜果
      有道

站内搜索



返回首页 | 关于我 | 联系我 | 广告合作 | 网站地图 | 友情链接 | 版权声明 |