配置tnsping跟踪来诊断Oracle Net连接

来源:互联网 发布:unity3d制作下雨特效 编辑:程序博客网 时间:2024/06/04 17:57
1.配置跟踪参数
默认情况下tnsping跟踪功能是关闭的.需要在sqlnet.ora配置文件中进行手工配置.
sqlnet.ora文件目录在E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN,注意:配置是在客户端,执行tnsping命令也是在客户端
# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (nts)

TNSPING.TRACE_LEVEL=support
2.执行跟踪过程
E:\>tnsping aux
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 31-10月-
2015 13:23:28
Copyright (c) 1997, 2005, Oracle.  All rights reserved.
已使用的参数文件:
E:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.1.35)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = kk)))
OK (10 毫秒)
3.跟踪文件解析

#####文件头#####
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 31-10月-2015 13:26:10
Copyright (c) 1997, 2005, Oracle.  All rights reserved.

--- TRACE CONFIGURATION INFORMATION FOLLOWS ---
New trace stream is E:\oracle\product\10.2.0\db_1\network\trace\tnsping.trc
New trace level is 16   #跟踪级别
--- TRACE CONFIGURATION INFORMATION ENDS ---
--- PARAMETER SOURCE INFORMATION FOLLOWS ---
Attempted load of system pfile source E:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
Parameter source loaded successfully

#####参数信息从sqlnet.ora中加载#####
 -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
Successful parameter table load
 -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
  TNSPING.TRACE_LEVEL = support
  TRACE_UNIQUE_CLIENT = on
  SQLNET.AUTHENTICATION_SERVICES = (nts)
--- PARAMETER SOURCE INFORMATION ENDS ---
--- LOG CONFIGURATION INFORMATION FOLLOWS ---
Log stream will be "standard output"
Log stream validation not requested
--- LOG CONFIGURATION INFORMATION ENDS ---


nlstdipi: entry
nlstdipi: exit
nnfun2awanm: entry
nnfgiinit: entry
nncpcin_maybe_init: first request sent to name server will have ID 0
nncpcin_maybe_init: initial retry timeout for all name servers is 1500 csecs
nncpcin_maybe_init: max request retries per name server is 1
nngsini_init_streams: initializing stream subsystem, cache size is 10
nngtini_init_msg: initializing PDU subsystem, initial pool size is 2
nncpcin_maybe_init: default name server domain is [root]
nnfgiinit: Installing read path
nnfgsrsp: entry
nnfgsrsp: Obtaining path parameter from names.directory_path or native_names.directory_path  #本地目录读取
nnfgsrsp: Parmeter names.directory_path not found, setting path to compiled in default
nnfgspd: entry
nnfgspd:     setting element DCE
nnfgspd:     setting element CDS
nnfgspd:     setting element TNSNAMES
nnfgspd:     setting element HOSTNAME
nnfgspd:     setting element EZCONNECT
nnfgspd:     setting element LDAP
nnfgspd: Path set
nnfgspd: exit
nnfun2a: entry
nlolgobj: entry
nnfgrne: entry
nnfgrne: Going though read path adapters
nnfgrne: Switching to DCE adapter
nnfgrne: Switching to CDS adapter
nnfgrne: Switching to TNSNAMES adapter
nnftboot: entry
nlpaxini: entry
nlpaxini: exit
nnftmlf_make_local_addrfile: entry
nnftmlf_make_local_addrfile: construction of local names file failed
nnftmlf_make_local_addrfile: exit
nlpaxini: entry
nlpaxini: exit
nnftmlf_make_system_addrfile: entry
nnftmlf_make_system_addrfile: system names file is E:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora  #定位到文件
nnftmlf_make_system_addrfile: exit
nnftboot: exit
nnftrne: entry
nnftrne: Original name: aux  #本次ping的对象
nnfttran: entry            
nncpdpt_dump_ptable: --- E:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora TABLE HAS THE FOLLOWING CONTENTS ---   
nncpdpt_dump_ptable: AUX = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.35)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = kk)))
nncpdpt_dump_ptable: --- END E:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora TABLE ---   #列出所有在tnsname.ora中的名称
nnfttran: exit
nnftrne: Using tnsnames.ora address (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.35)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = kk))) for name aux
nnftrne: exit
nnfgrne: exit
nlolgserv: entry
nnfggav: entry
nnftgav: entry
nnftgav: exit
nnfgfrm: entry
nnftfrm: entry
nnftfrm: exit
nnfgfrm: exit
nlolgserv: exit
nlolgobj: exit
nlolfmem: entry
nlolfmem: exit
nnfun2awanm: Getting the path of sqlnet.ora
nnfun2awanm: Getting the adapter name
nnfun2awanm: exit
nscall: entry
nsmal: entry
nsmal: 212 bytes at 0xea7fa0  #解析aux连接串
nsmal: normal exit
nscall: connecting...
nladini: entry
nladini: exit
nladget: entry
nladget: exit
nsc2addr: entry
nsc2addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.35)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=kk)))
nttbnd2addr: entry
snlinGetAddrInfo: entry
snlinGetAddrInfo: exit
nttbnd2addr: using host IP address: 192.168.1.35
snlinFreeAddrInfo: entry
snlinFreeAddrInfo: exit
nttbnd2addr: exit
nsc2addr: normal exit
nsopen: entry
nsmal: entry
nsmal: 736 bytes at 0xef1fc0
nsmal: normal exit
nsopenmplx: entry
nsmal: entry
nsmal: 1644 bytes at 0xef22a8
nsmal: normal exit
nsiorini: entry
nsbal: entry
nsbgetfl: entry
nsbgetfl: normal exit
nsmal: entry
nsmal: 84 bytes at 0xef1e58
nsmal: normal exit
nsbal: normal exit
nsiorini: exit (0)
nscpxget: entry
nscpxget: normal exit
nsopenalloc_nsntx: nlhthput on mplx_ht_nsgbu:ctx=ef1fc0, nsntx=ef22a8
nsopenmplx: normal exit
nsopen: opening transport...
nttcon: entry
nttcon: toc = 1
nttcnp: entry
nttcnp: creating a socket.   #连接开始
nttcnp: exit
nttcni: entry
nttcni: trying to connect to socket 1824.
snlinGetNameInfo: entry
snlinGetNameInfo: Using numeric form of host's address 192.168.1.35
snlinGetNameInfo: exit
nttcni: connected on ipaddr 192.168.1.35  #ip地址
nttcni: exit
nttcon: NT layer TCP/IP connection has been established.
nttcon: set TCP_NODELAY on 1824
nttcon: exit
nsopen: transport is open
nsoptions: entry
nsoptions: lcl[0]=0x0, lcl[1]=0x900001, gbl[0]=0x0, gbl[1]=0x0, cha=0x0
nsoptions: lcl[0]=0xf4ffefff, lcl[1]=0x900001, gbl[0]=0xfabf, gbl[1]=0x0
nsoptions: normal exit
nsnainit: entry
nsnainit: call
nsnainit: NA not wanted - disabling and returning
nsopen: global context check-in (to slot 0) complete
nsopen: lcl[0]=0xf4ffefff, lcl[1]=0x900001, gbl[0]=0xfabf, gbl[1]=0x0, tdu=32767, sdu=2048
nsdo: entry
nsdo: cid=0, opcode=65, *bl=0, *what=0, uflgs=0x0, cflgs=0x2
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=7, flg=0x4001, mvd=0
nsbal: entry
nsbgetfl: entry
nsbgetfl: normal exit
nsmal: entry
nsmal: 84 bytes at 0xef3918
nsmal: normal exit
nsbal: normal exit
nsbal: entry
nsbgetfl: entry
nsbgetfl: normal exit
nsmal: entry
nsmal: 84 bytes at 0xef4198
nsmal: normal exit
nsbal: normal exit
nsdo: nsctxrnk=0
nsdo: normal exit
nsopen: normal exit
nsdo: entry
nsdo: cid=0, opcode=67, *bl=29, *what=8, uflgs=0x0, cflgs=0x3
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=14, flg=0x4005, mvd=0
nsdo: gtn=10, gtc=10, ptn=10, ptc=2011
nscon: entry
nscon: doing connect handshake...
nscon: sending NSPTCN packet
nspsend: entry
nspsend: plen=87, type=1
nttwr: entry
nttwr: socket 1824 had bytes written=87
nttwr: exit
nspsend: packet dump
nspsend: 00 57 00 00 01 00 00 00  |.W......|
nspsend: 01 39 01 2C 00 00 08 00  |.9.,....|
nspsend: 7F FF C6 0E 00 00 01 00  |........|
nspsend: 00 1D 00 3A 00 00 00 00  |...:....|
nspsend: 00 00 00 00 00 00 00 00  |........|
nspsend: 00 00 00 00 00 00 00 00  |........|
nspsend: 00 00 00 00 00 00 00 00  |........|
nspsend: 00 00 28 43 4F 4E 4E 45  |..(CONNE|
nspsend: 43 54 5F 44 41 54 41 3D  |CT_DATA=|
nspsend: 28 43 4F 4D 4D 41 4E 44  |(COMMAND|
nspsend: 3D 70 69 6E 67 29 29     |=ping)) |
nspsend: 87 bytes to transport  #发出87字节
nspsend: normal exit
nscon: exit (0)
nsdo: nsctxrnk=0
nsdo: normal exit
nsdo: entry
nsdo: cid=0, opcode=68, *bl=1024, *what=9, uflgs=0x2000, cflgs=0x3
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=2, flg=0x4005, mvd=0
nsdo: gtn=10, gtc=10, ptn=10, ptc=2011
nscon: entry
nscon: recving a packet  #收到包
nsprecv: entry
nsprecv: reading from transport...
nttrd: entry
nttrd: socket 1824 had bytes read=73  #读取到73字节的回信
nttrd: exit
nsprecv: 73 bytes from transport
nsprecv: tlen=73, plen=73, type=4
nsprecv: packet dump
nsprecv: 00 49 00 00 04 00 00 00  |.I......|
nsprecv: 22 00 00 3D 28 44 45 53  |"..=(DES|
nsprecv: 43 52 49 50 54 49 4F 4E  |CRIPTION|
nsprecv: 3D 28 54 4D 50 3D 29 28  |=(TMP=)(|
nsprecv: 56 53 4E 4E 55 4D 3D 31  |VSNNUM=1|
nsprecv: 36 39 38 36 39 35 36 38  |69869568|
nsprecv: 29 28 45 52 52 3D 30 29  |)(ERR=0)|
nsprecv: 28 41 4C 49 41 53 3D 4C  |(ALIAS=L|
nsprecv: 49 53 54 45 4E 45 52 29  |ISTENER)|
nsprecv: 29                       |)       |
nsprecv: normal exit
nscon: got NSPTRF packet
nscon: got 61 bytes connect data
nscon: exit (0)
nsdo: nsctxrnk=0
nsdo: normal exit
nscall: refused
nsclose: entry
nstimarmed: entry
nstimarmed: no timer allocated
nstimarmed: normal exit
nttctl: entry
nttctl: entry
nsdo: entry
nsdo: cid=0, opcode=98, *bl=0, *what=0, uflgs=0x440, cflgs=0x2
nsdo: rank=64, nsctxrnk=0
nsdo: nsctx: state=3, flg=0x4001, mvd=0
nsbfr: entry
nsbaddfl: entry
nsbaddfl: normal exit
nsbfr: normal exit
nsbfr: entry
nsbaddfl: entry
nsbaddfl: normal exit
nsbfr: normal exit
nsdo: nsctxrnk=0
nsdo: normal exit
nsiocancel: entry
nsiofrrg: entry
nsbfr: entry
nsbaddfl: entry
nsbaddfl: normal exit
nsbfr: normal exit
nsiofrrg: exit
nsiocancel: exit
nsclose: closing transport  #关闭传输
nttdisc: entry
nttdisc: Closed socket 1824
nttdisc: exit
nsclose: global context check-out (from slot 0) complete
nsnadisc: entry
nsnadisc: no native services in use - returning
nsopenfree_nsntx: nlhthdel from mplx_ht_nsgbu, ctx=ef1fc0 nsntx=ef22a8
nsiocancel: entry
nsiofrrg: entry
nsiofrrg: exit
nsiocancel: exit
nsmfr: entry
nsmfr: 1644 bytes at 0xef22a8
nsmfr: normal exit
nsmfr: entry
nsmfr: 736 bytes at 0xef1fc0
nsmfr: normal exit
nsclose: normal exit
nscall: error exit
nsdisc: entry
nsclose: entry
nsclose: normal exit
nsdisc: exit (0)
nlse_term_audit: entry
nlse_term_audit: exit



0 0
原创粉丝点击