Oracle lsnrctl Tracing Listener Connections

原创 2008年10月03日 10:40:00

Tracing Listener Connections

Network connections are traced to provide a detailed description of the operations performed by Oracle's internal components. The trace data is stored in an output trace file that can then be analyzed.

The following four steps can be performed to trace listener connections:

1. Enable tracing for the appropriate period of time needed to capture enough data.

LSNRCTL> set trc_level ADMIN

2. Disable tracing.

LSNRCTL> set trc_level OFF

3. View trace file (optional) - the trace file can be viewed although it is very cryptic. The file can be located by using the show command along with trc_directory and again with trc_file. The following is an example of the raw trace file.

nsdo: cid=6, opcode=65, *bl=0, *what=0, uflgs=0x0, cflgs=0x2
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=7, flg=0x4200, mvd=0
nsdo: nsctxrnk=0
nsanswer: deferring connect attempt; at stage 5
nsevreg: begin registration process for 6
nsevreg: sgt=0, evn=4, evt[2]=0x0
nsevreg: begin notification process for 6
nsrah: setting transport read mode (2)
nsevreg: rdm=2, sgt=0, evt[0]=0x20, [1]=0x20, [2]=0x0, nrg=0
nsevreg: registering for 0x20
nsrah: reading (asynchronously) from transport...
nsrah: ...into overflow area...
ntnrd: failed to read 8208 bytes
ntn2err: entry
ntn2err: error: handle=396, op=5, nt[0]=524, nt[1]=997

4. Format Trace File with the trcasst utility. Oracle9i Release 2 introduces the Oracle Net Trace assistant to help administrators decipher information contained in the trace files. The trcasst command can be used to provide a more readable trace. This is very helpful when advanced diagnosis is required for problem debugging.
The trcasst utility provides the following command line options:

• -o – Displays services and TTC (Two Task Common) information. Valid options to use with –o include:

• c – Summary of connection information.

• d – Detailed connection information.

• u – Summary of TTC information.

• t – Detailed TTC information.

• q – SQL commands (used in combination with u).

• -e – Displays error information. Valid options to use with –e include:

• 0 – translates NS error numbers.

• 1 – Displays only error translation.

• 2 – Displays error numbers without translation.

• -l – Displays services and TTC information. Valid options to use with –l include:

• a – Displays data for all connections in trace file.

• i – Displays the trace data for a particular ID from the –la option.

• -s – Displays a summary of statistics. This includes total bytes sent and received, maximum open cursors, total calls, parse counts, and more.
If no options are specified on the command line, the default will be:

trcasst –odt –e0 –s

Sample output generated by the trcasst utility is below.

C:/oracle9i/network/trace>trcasst listener.trc

Trace Assistant Utility: Version Production on February 6, 2003 9:12:
2 PM

(c) Copyright 2002 Oracle Corporation. All rights reserved.

* Trace Assistant *

Error found. Error Stack follows:
Operation code:68
NS Error 1:12537
NS Error 2:12560
NT Generic Error:507
Protocol Error:109
OS Error:0
NS & NT Errors Translation
12537, 00000 "TNS:connection closed"
// *Cause: "End of file" condition has been reached; partner has disconnected.

// *Action: None needed; this is an information message.
12560, 00000 "TNS:protocol adapter error"
// *Cause: A generic protocol adapter error occurred.
// *Action: Check addresses used for proper protocol specification. Before
// reporting this error, look at the error stack and check for lower level
// transport errors.For further details, turn on tracing and reexecute the
// operation. Turn off tracing when the operation is complete.
00507, 00000 "Connection closed"
// *Cause: Normal "end of file" condition has been reached; partner has
// disconnected.
// *Action: None needed; this is an information message.

Trace File Statistics:
Total number of Sessions: 0

Operation Count: 0 OPENS, 0 PARSES, 0 EXECUTES, 0 FETCHES

Total Calls : 0 sent, 0 received, 0 oci
Total Bytes : 0 sent, 0 received
Average Bytes: sent per packet, received per packet
Maximum Bytes: 0 sent, 0 received

Grand Total Packets: 0 sent, 0 received

* Trace Assistant has completed *

The raw trace file is not nearly as helpful as the results from the trcasst utility.

Due to the resources required, tracing the listener activity should be reserved only for debugging connectivity problems. The amount of trace information generated by the tool can be enormous.

Oracle LSNRCTL------监听器的启动和关闭

      对于DBA来说,启动和关闭oracle监听器是很基础的任务,但是Linux系统管理员或者程序员有时也需要在开发数据库中做一些基本的DBA操作,因此了解一些基本的管理操作对他们来说很重要。 ...
  • zjliu1984
  • zjliu1984
  • 2009年06月16日 14:31
  • 26386

Oracle监听启动失败“TNS-12541:TNS: No Listener”

当你打开Oracle监听时,出现以下错误提示: TNS-12541:TNS: No Listener TNS-12560:TNS:Protocol adapter error TNS-00511:T...
  • e_wsq
  • e_wsq
  • 2014年07月11日 23:03
  • 4635

ORACLE监听器 The listener supports no services 问题解决方法

 安装环境: 操作系统版本:RHCLE5 ORACLE版本:11gR2 开启监听器,远程连接报错: ORA-12514: TNS:linstener does not currently...
  • snowfoxmonitor
  • snowfoxmonitor
  • 2015年08月16日 20:27
  • 13010

Oracle Lsnrctl - 关于oracle监听器的命令和解释

转自:       对于DBA来说,启动和关闭oracle监听器是很基础的任...
  • fm0517
  • fm0517
  • 2009年09月18日 10:04
  • 28451


1. 停止写listener log 在某些特定的场合可能会有这样的需求。控制这个功能的参数是LOG_STATUS。 官网对这个参数的说明:To turn listenerlogging on or...
  • zhaojian1988
  • zhaojian1988
  • 2015年01月04日 10:21
  • 503

ORACLE 11g 由新特性引发lsnrctl hang住卡死迷雾的详细剖析历程

1、问题描述同事说卡住了,连接oracle数据库很慢,需要很久,连上了做一个简单的查询也非常慢,感觉像是hang主了一般。  2、分析oracle服务器负载一开始登录进去,查看oracle服务器,负载...
  • mchdba
  • mchdba
  • 2016年10月17日 21:20
  • 3280

oracle 11G的listener的日志和listener告警日志

oracle 9i下的listener日志是在$ORACLE_HOME/network/log目录里,最近用了11G,发
  • onebigday
  • onebigday
  • 2014年06月05日 15:36
  • 28039

oracle 监听启动的时候 lsnrctl start 的显示 什么服务read unknown 之类的解释

Listener Status June 8, 2009 Tags: oracle listener     监听有三种状态:block、unkown、ready Service “+AS...
  • taodearyy
  • taodearyy
  • 2012年09月17日 09:52
  • 1397

lsnrctl status 缺少Listener Parameter File信息

一:环境信息主机平台:linux 6.2数据库版本:单实例二:问题现象  lsnrctl status查看监听状态时发现没有监听文件(Listener Parameter ...
  • shaochenshuo
  • shaochenshuo
  • 2014年05月20日 21:14
  • 804

Oracle listener lsnrctl

lsnrctl(Listener Control)是一个SQL*Net工具,用于控制数据库listener,这个工具提供了命令用于控制listener的启动、停止,查看listener的状态,改变li...
  • liuy_98_1001
  • liuy_98_1001
  • 2014年09月28日 10:56
  • 1908
您举报文章:Oracle lsnrctl Tracing Listener Connections