如何使用sqlnet net trace 跟踪或调试oracle连接故障

简介:

Oracle Net trace 用于跟踪或调试oracle连接故障,连接异常断开或者连接超时等情形,通过产生详细的跟踪信息来进行分析和诊断Oracle Net相关故障。关于这个网络调试主要是通过为相关的网络配置文件添加相关的参数来实现

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时,必须添加下列参数禁用adr

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=/your_directory

启用sqlnet trace
为客户端的sqlnet.ora文件添加下列项来启用sqlnet trace,trace后,建议移除这些选项以避免额外的网络开销
Trace_level_client=16
Trace_directory_client=<path_to_the_trace_directory> # use the full path to the trace directory
Trace_unique_client=on
Trace_timestamp_client=on
Diag_adr_enabled=off


oracle net trace的组件,参数文件及缺省的trace文件
oracle net component | configuration file | default trace file
----------------------- --------------------- --------------------------------
oracle net listener    listener.ora           listener.trc
oracle net - client    sqlnet.ora on client    cli*.trc
oracle net - server    sqlnet.ora on server    svr_*.trc
tnsping                sqlnet.ora on client | server  tnsping.trc
oracle name server      names.ora                   names.trc
oracle namesctl         sqlnet.ora on server
oracle connection manager cman.ora



03、TRACE时的注意事项
   1、确保所需trace的配置文件存在
     缺省情况下,Oracle会从下列位置搜索网络配置文件
     a.TNS_ADMIN environment variable (incl. Windows Registry Key)
     b./etc or /var/opt/oracle (Unix)
     c.$ORACLE_HOME/network/admin (Unix)
     d.%ORACLE_HOME%/Network/Admin or %ORACLE_HOME%/Net80/Admin (Windows)
     Note: User-specific Oracle Net parameters may also reside in $HOME/sqlnet.ora file.
     An Oracle Net server installation is also a client itself.
  2、 确保trace文件所在的磁盘有足够的空间
  3、当有关Oracle net故障解决后应立即禁用Oracle net trace特性
  4、大型的跟踪日志文件使得进程开销过大,因此在无异常的情况下关闭trace特性,截断日志文件等以提高Oracle net整体性能
  5、确保连接的用户对跟踪日志文件所在的路径用户有写权限
  6、对于服务器端的trace,将其置为OFF后,并不能立即停止服务器端的trace,需要重启监听
  7、Oracle Net本身也产生相关的日志,如监听日志,sqlnet日志等,Oracle Net trace则是在此基础之上提供更为详尽的故障诊断信息
04、trace的相关示例
分客户端与服务端:

001、客户端trace
修改客户端的sqlnet.ora文件
Trace_level_client=16
Trace_directory_client=D:\app\Administrator\product\11.2.0\client_1\network\admin
Trace_unique_client=on
Trace_timestamp_client=on
Diag_adr_enabled=off
tnsping.trace_directory=D:\app\Administrator\product\11.2.0\client_1\network\admin
tnsping.trace_level=admin


实验测试

修改客户端的sqlnet.ora文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# sqlnet.ora Network Configuration File: D:\app\Administrator\product\11.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# 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)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
#SQLnet trace
Trace_level_client=16
Trace_directory_client=D:\app\Administrator\product\11.2.0\client_1\network\admin
Trace_unique_client=on
Trace_timestamp_client=on
Diag_adr_enabled=off
tnsping.trace_directory=D:\app\Administrator\product\11.2.0\client_1\network\admin
tnsping.trace_level=admin

在客户端中tnsping udevasm 如下:

wKiom1lrDqOBMmMcAACKb7iM4Sw947.jpg

查看生成的trace 文件如下:

wKioL1lrDoqSmr5OAAByEdP6AZg055.jpg

内容如下:

TNS Ping Utility for 32-bit Windows: Version 11.2.0.4.0 - Production on 16-7月 -2017 14:20:26

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

--- TRACE CONFIGURATION INFORMATION FOLLOWS ---
New trace stream is D:\app\Administrator\product\11.2.0\client_1\network\admin\tnsping.trc
New trace level is 6
--- TRACE CONFIGURATION INFORMATION ENDS ---
--- PARAMETER SOURCE INFORMATION FOLLOWS ---
Attempted load of system pfile source D:\app\Administrator\product\11.2.0\client_1\network\admin\sqlnet.ora
Parameter source loaded successfully

 -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
Successful parameter table load
 -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
  Diag_adr_enabled = off
  tnsping.trace_level = admin
  Trace_level_client = 16
  NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
  tnsping.trace_directory = D:\app\Administrator\product\11.2.0\client_1\network\admin
  Trace_unique_client = on
  SQLNET.AUTHENTICATION_SERVICES = (NTS)
  Trace_directory_client = D:\app\Administrator\product\11.2.0\client_1\network\admin
  Trace_timestamp_client = on
--- 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: 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
nnfgsrdp: entry
nnfgsrdp: Setting path:
nnfgsrdp: checking element TNSNAMES
nnfgsrdp: checking element EZCONNECT
nnfgsrdp: Path set
nnfun2a: entry
nlolgobj: entry
nnfgrne: entry
nnfgrne: Going though read path adapters
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 D:\app\Administrator\product\11.2.0\client_1\network\admin\tnsnames.ora
nnftmlf_make_system_addrfile: exit
nnftboot: exit
nnftrne: entry
nnftrne: Original name: udevasm
nnfttran: entry
nnfttran: exit
nnftrne: Using tnsnames.ora address (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.152)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = udevasm))) for name udevasm
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
nsmal: 216 bytes at 0x3df65a0
nscall: connecting...
snlinGetAddrInfo: entry
snlinGetAddrInfo: exit
snlinFreeAddrInfo: entry
snlinFreeAddrInfo: exit
nladini: entry
nladini: exit
nladget: entry
nladget: exit
nsmal: 107 bytes at 0x3df6fb8
nsc2addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.152)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=udevasm)))
nttbnd2addr: entry
snlinGetAddrInfo: entry
snlinGetAddrInfo: exit
nttbnd2addr: using host IP address: 192.168.1.152
snlinFreeAddrInfo: entry
snlinFreeAddrInfo: exit
nttbnd2addr: exit
nsmal: 1056 bytes at 0x3df7030
nsmal: 2120 bytes at 0x3df7458
nsmal: 84 bytes at 0x3df7de8
nsopen: opening transport...
nttcon: entry
nttcon: toc = 1
nttcnp: entry
nttcnp: exit
nttcni: entry
nttcni: Tcp conn timeout = 60000 (ms)
nttctl: entry

.........内容比较多就是省略了后面内容


上面显示的是正常的逻辑下面的内容


下面再来看报错时如何看trace文件

修改tnsname.or中服务器名

UDEVASM1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.152)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = udevasm)
    )
  )


udevasm修改udevasm1


然后通过sqlplus登录


C:\Users\Administrator>sqlplus sys/oracle@udevasm

SQL*Plus: Release 11.2.0.4.0 Production on 星期日 7月 16 14:25:23 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS: 无法解析指定的连接标识符


请输入用户名:  sys
输入口令:
ERROR:
ORA-12560: TNS: 协议适配器错误


请输入用户名:  sys
输入口令:
ERROR:
ORA-12560: TNS: 协议适配器错误


SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus

查看trace文件,截取部分内容如下:


[16-7月 -2017 14:25:23:163] --- TRACE CONFIGURATION INFORMATION FOLLOWS ---
[16-7月 -2017 14:25:23:163] New trace stream is D:\app\Administrator\product\11.2.0\client_1\network\admin\cli_932.trc
[16-7月 -2017 14:25:23:163] New trace level is 16
[16-7月 -2017 14:25:23:163] --- TRACE CONFIGURATION INFORMATION ENDS ---
[16-7月 -2017 14:25:23:163] --- PARAMETER SOURCE INFORMATION FOLLOWS ---
[16-7月 -2017 14:25:23:163] Attempted load of system pfile source D:\app\Administrator\product\11.2.0\client_1\network\admin\sqlnet.ora
[16-7月 -2017 14:25:23:163] Parameter source loaded successfully
[16-7月 -2017 14:25:23:163] 
[16-7月 -2017 14:25:23:163] Attempted load of local pfile source C:\Users\Administrator\sqlnet.ora
[16-7月 -2017 14:25:23:163] Parameter source was not loaded
[16-7月 -2017 14:25:23:163] 
[16-7月 -2017 14:25:23:163]  -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
[16-7月 -2017 14:25:23:163] Successful parameter table load
[16-7月 -2017 14:25:23:163]  -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
[16-7月 -2017 14:25:23:163]   Diag_adr_enabled = off
[16-7月 -2017 14:25:23:163]   tnsping.trace_level = admin
[16-7月 -2017 14:25:23:163]   Trace_level_client = 16
[16-7月 -2017 14:25:23:163]   NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
[16-7月 -2017 14:25:23:163]   tnsping.trace_directory = D:\app\Administrator\product\11.2.0\client_1\network\admin
[16-7月 -2017 14:25:23:163]   Trace_unique_client = on
[16-7月 -2017 14:25:23:163]   SQLNET.AUTHENTICATION_SERVICES = (NTS)
[16-7月 -2017 14:25:23:163]   Trace_directory_client = D:\app\Administrator\product\11.2.0\client_1\network\admin
[16-7月 -2017 14:25:23:163]   Trace_timestamp_client = on
[16-7月 -2017 14:25:23:163] --- PARAMETER SOURCE INFORMATION ENDS ---
[16-7月 -2017 14:25:23:163] --- LOG CONFIGURATION INFORMATION FOLLOWS ---
[16-7月 -2017 14:25:23:163] Log stream will be "C:\Users\Administrator\sqlnet.log"
[16-7月 -2017 14:25:23:163] Log stream validation not requested
[16-7月 -2017 14:25:23:163] --- LOG CONFIGURATION INFORMATION ENDS ---

[16-7月 -2017 14:25:23:163] nlstdipi: entry
[16-7月 -2017 14:25:23:163] nlstdipi: exit
[16-7月 -2017 14:25:23:163] nigini: entry
[16-7月 -2017 14:25:23:163] nigini: Count in the NL global area is now 1
[16-7月 -2017 14:25:23:163] nigini: Count in NI gbl area now: 1
[16-7月 -2017 14:25:23:163] nrigbi: entry
[16-7月 -2017 14:25:23:163] nrigbni: entry
[16-7月 -2017 14:25:23:163] nrigbni: Unable to get data from navigation file tnsnav.ora
[16-7月 -2017 14:25:23:163] nrigbni: exit
[16-7月 -2017 14:25:23:163] nrigbi: exit
[16-7月 -2017 14:25:23:163] nigini: exit
[16-7月 -2017 14:25:23:179] nigsui: entry
[16-7月 -2017 14:25:23:179] nigsui: Set User Interrupt: hdl=0, prc=0x404070, ctx=0x8f2b50.
[16-7月 -2017 14:25:23:179] nigsui: exit (0)
[16-7月 -2017 14:25:23:194] nigini: entry
[16-7月 -2017 14:25:23:194] nigini: Count in the NL global area is now 2
[16-7月 -2017 14:25:23:194] nigini: Count in NI gbl area now: 2
[16-7月 -2017 14:25:23:194] nigini: exit
[16-7月 -2017 14:25:23:194] niqname: Using nnfsn2a() to build connect descriptor for (possibly remote) database.
[16-7月 -2017 14:25:23:194] nnfgiinit: entry
[16-7月 -2017 14:25:23:194] nncpcin_maybe_init: default name server domain is [root]
[16-7月 -2017 14:25:23:194] nnfgiinit: Installing read path
[16-7月 -2017 14:25:23:194] nnfgsrsp: entry
[16-7月 -2017 14:25:23:194] nnfgsrsp: Obtaining path parameter from names.directory_path or native_names.directory_path
[16-7月 -2017 14:25:23:194] nnfgsrdp: entry
[16-7月 -2017 14:25:23:194] nnfgsrdp: Setting path:
[16-7月 -2017 14:25:23:194] nnfgsrdp: checking element TNSNAMES
[16-7月 -2017 14:25:23:194] nnfgsrdp: checking element EZCONNECT
[16-7月 -2017 14:25:23:194] nnfgsrdp: Path set
[16-7月 -2017 14:25:23:194] nnfun2a: entry
[16-7月 -2017 14:25:23:194] nlolgobj: entry
[16-7月 -2017 14:25:23:194] nnfgrne: entry
[16-7月 -2017 14:25:23:194] nnfgrne: Going though read path adapters
[16-7月 -2017 14:25:23:194] nnfgrne: Switching to TNSNAMES adapter
[16-7月 -2017 14:25:23:194] nnftboot: entry
[16-7月 -2017 14:25:23:194] nlpaxini: entry
[16-7月 -2017 14:25:23:194] nlpaxini: exit
[16-7月 -2017 14:25:23:194] nnftmlf_make_local_addrfile: entry
[16-7月 -2017 14:25:23:194] nnftmlf_make_local_addrfile: construction of local names file failed
[16-7月 -2017 14:25:23:194] nnftmlf_make_local_addrfile: exit
[16-7月 -2017 14:25:23:194] nlpaxini: entry
[16-7月 -2017 14:25:23:194] nlpaxini: exit
[16-7月 -2017 14:25:23:194] nnftmlf_make_system_addrfile: entry
[16-7月 -2017 14:25:23:194] nnftmlf_make_system_addrfile: system names file is D:\app\Administrator\product\11.2.0\client_1\network\admin\tnsnames.ora
[16-7月 -2017 14:25:23:194] nnftmlf_make_system_addrfile: exit
[16-7月 -2017 14:25:23:194] nnftboot: exit
[16-7月 -2017 14:25:23:194] nnftrne: entry
[16-7月 -2017 14:25:23:194] nnftrne: Original name: udevasm
[16-7月 -2017 14:25:23:194] nnfttran: entry
[16-7月 -2017 14:25:23:194] nnfttran: Error querying udevasm of attribute A.SMD errcode 408
[16-7月 -2017 14:25:23:194] nnfgrne: Query unsuccessful, skipping to next adapter
[16-7月 -2017 14:25:23:194] nnfgrne: Switching to EZCONNECT adapter
[16-7月 -2017 14:25:23:194] nnfhboot: entry
[16-7月 -2017 14:25:23:194] nnfhboot: exit
[16-7月 -2017 14:25:23:194] snlinGetAddrInfo: entry
[16-7月 -2017 14:25:25:846] snlinGetAddrInfo: getaddrinfo() failed with error 11004
[16-7月 -2017 14:25:25:846] snlinGetAddrInfo: exit
[16-7月 -2017 14:25:25:846] nnfhrne: Error forming address for udevasm, errcode 406
[16-7月 -2017 14:25:25:846] nnfgrne: Query unsuccessful, skipping to next adapter
[16-7月 -2017 14:25:25:846] nnfgrne: exit
[16-7月 -2017 14:25:25:846] nnfun2a: address for name "udevasm" not found
[16-7月 -2017 14:25:25:846] niqname: Return code from nnfsn2a is 1
[16-7月 -2017 14:25:25:846] nigtrm: Count in the NI global area is now 1
[16-7月 -2017 14:25:25:846] nigtrm: Count in the NL global area is now 1
[16-7月 -2017 14:25:25:862] nigini: entry
[16-7月 -2017 14:25:25:862] nigini: Count in the NL global area is now 2
[16-7月 -2017 14:25:25:862] nigini: Count in NI gbl area now: 2
[16-7月 -2017 14:25:25:862] nigini: exit
[16-7月 -2017 14:25:25:862] niqname: Using nnfsn2a() to build connect descriptor for (possibly remote) database.
[16-7月 -2017 14:25:25:862] nnfun2a: entry
[16-7月 -2017 14:25:25:862] nlolgobj: entry
[16-7月 -2017 14:25:25:862] nnfgrne: entry
[16-7月 -2017 14:25:25:862] nnfgrne: Going though read path adapters
[16-7月 -2017 14:25:25:862] nnfgrne: Switching to TNSNAMES adapter
[16-7月 -2017 14:25:25:862] nnftrne: entry
[16-7月 -2017 14:25:25:862] nnftrne: Original name: udevasm
[16-7月 -2017 14:25:25:862] nnfttran: entry
[16-7月 -2017 14:25:25:862] nnfttran: Error querying udevasm of attribute A.SMD errcode 408
[16-7月 -2017 14:25:25:862] nnfgrne: Query unsuccessful, skipping to next adapter
[16-7月 -2017 14:25:25:862] nnfgrne: Switching to EZCONNECT adapter
[16-7月 -2017 14:25:25:862] snlinGetAddrInfo: entry
[16-7月 -2017 14:25:28:483] snlinGetAddrInfo: getaddrinfo() failed with error 11004
[16-7月 -2017 14:25:28:483] snlinGetAddrInfo: exit
[16-7月 -2017 14:25:28:483] nnfhrne: Error forming address for udevasm, errcode 406
[16-7月 -2017 14:25:28:483] nnfgrne: Query unsuccessful, skipping to next adapter
[16-7月 -2017 14:25:28:483] nnfgrne: exit
[16-7月 -2017 14:25:28:483] nnfun2a: address for name "udevasm" not found
[16-7月 -2017 14:25:28:483] niqname: Return code from nnfsn2a is 1
[16-7月 -2017 14:25:28:483] nigtrm: Count in the NI global area is now 1
[16-7月 -2017 14:25:28:483] nigtrm: Count in the NL global area is now 1
[16-7月 -2017 14:25:28:483] nigini: entry
[16-7月 -2017 14:25:28:483] nigini: Count in the NL global area is now 2
[16-7月 -2017 14:25:28:483] nigini: Count in NI gbl area now: 2
[16-7月 -2017 14:25:28:483] nigini: exit


从上面报错的信息可以看出来,udevasm这个SID不存在,无法找到,因为我们在上面修改了这个名称,因此可以判断这个是SID的错误


服务器端的修改和客户端修改一样,只不过在服务器端的要重新加载一个监听,lsnrctl reload

[oracle@localhost trace]$ ll
-rw-r----- 1 oracle oinstall  4487 Jul 16 15:42 db011_11048.trc
-rw-r----- 1 oracle oinstall  3536 Jul 16 15:42 db011_11051.trc
-rw-r----- 1 oracle oinstall  3768 Jul 16 15:43 db011_11056.trc
-rw-r----- 1 oracle oinstall  3536 Jul 16 15:43 db011_11058.trc
-rw-r----- 1 oracle oinstall  4487 Jul 16 15:44 db011_11063.trc
-rw-r----- 1 oracle oinstall  3536 Jul 16 15:44 db011_11065.trc
-rw-r----- 1 oracle oinstall  3768 Jul 16 15:45 db011_11070.trc
-rw-r----- 1 oracle oinstall  3536 Jul 16 15:45 db011_11072.trc
-rw-r----- 1 oracle oinstall  4255 Jul 16 15:46 db011_11075.trc
-rw-r----- 1 oracle oinstall  4487 Jul 16 15:46 db011_11081.trc
-rw-r----- 1 oracle oinstall  3536 Jul 16 15:46 db011_11083.trc
-rw-r----- 1 oracle oinstall     0 Jul 16 15:42 db012_11048.trc
-rw-r----- 1 oracle oinstall     0 Jul 16 15:42 db012_11051.trc
-rw-r----- 1 oracle oinstall     0 Jul 16 15:43 db012_11056.trc

由于trace文件内容显示的不是很友好,不方便排查错误,可以通过对于session trace, Oracle提供了tkprof工具,对于net trace,Oracle也提供了工具,那就是trcasst来格式化trace文件。

现就通过trcasst来格式化trace文件

[oracle@localhost trace]$ trcasst -odt -e0 -s cli_932.trc     

Trace Assistant Utility: Version 11.2.0.3.0 Production on July 16, 2017 3:57:43 PM

Copyright (c) 2001, 2011, Oracle.  All rights reserved.


    *************************************************************************
    *                        Trace Assistant                                *
    *************************************************************************

///////////////////////////////////////////////////////////////
Error found. Error Stack follows:
              id:0
  Operation code:65
      NS Error 1:12560
      NS Error 2:0
NT Generic Error:530
  Protocol Error:126
        OS Error:0
 NS & NT Errors Translation
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. 
/
00000, 00000 "Not An Error" 
 // *Cause:  Everything is working as it should. 
 // *Action: Dont worry: Be happy. 
/
00530, 00000 "Protocol adapter error" 
 // *Cause: A generic protocol adapter error occurred. 
 // *Action: For further details, turn on tracing and reexecute the operation. 
/
///////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////
Error found. Error Stack follows:
              id:0
  Operation code:65
      NS Error 1:12560
      NS Error 2:0
NT Generic Error:530
  Protocol Error:126
        OS Error:0
 NS & NT Errors Translation
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. 
/
00000, 00000 "Not An Error" 
 // *Cause:  Everything is working as it should. 
 // *Action: Dont worry: Be happy. 
/
00530, 00000 "Protocol adapter error" 
 // *Cause: A generic protocol adapter error occurred. 
 // *Action: For further details, turn on tracing and reexecute the operation. 
/
///////////////////////////////////////////////////////////////


----------------------
Trace File Statistics:
----------------------
Total number of Sessions: 0

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


ORACLE NET SERVICES:
  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                      *
    *************************************************************************

总结:对于客户端到数据库服务端的一些连接问题,可以先按程序、监听本身、客户端版本等方面排查,如果不能解决问题,则可以通过sqlnet trace来排查原因





















本文转自xiaocao1314051CTO博客,原文链接: http://blog.51cto.com/xiaocao13140/1948000,如需转载请自行联系原作者

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
2月前
|
开发框架 Oracle 关系型数据库
ASP.NET实验室LIS系统源码 Oracle数据库
LIS是HIS的一个组成部分,通过与HIS的无缝连接可以共享HIS中的信息资源,使检验科能与门诊部、住院部、财务科和临床科室等全院各部门之间协同工作。 
35 4
|
5月前
|
SQL Oracle 关系型数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
本机不安装Oracle客户端,使用PL/SQL Developer连接远程数据库
135 0
|
6月前
|
Oracle 关系型数据库 流计算
Flink CDC不支持直接连接到Oracle ADG备库进行数据同步
Flink CDC不支持直接连接到Oracle ADG备库进行数据同步
106 1
|
1月前
|
Oracle Java 关系型数据库
SpringBoot整合Mybatis连接Oracle数据库
SpringBoot整合Mybatis连接Oracle数据库
SpringBoot整合Mybatis连接Oracle数据库
|
1月前
|
Oracle 关系型数据库 MySQL
Flink CDC产品常见问题之使用cdc-Oracle连接器报错如何解决
Flink CDC(Change Data Capture)是一个基于Apache Flink的实时数据变更捕获库,用于实现数据库的实时同步和变更流的处理;在本汇总中,我们组织了关于Flink CDC产品在实践中用户经常提出的问题及其解答,目的是辅助用户更好地理解和应用这一技术,优化实时数据处理流程。
Flink CDC产品常见问题之使用cdc-Oracle连接器报错如何解决
|
4月前
|
运维 Oracle 关系型数据库
服务器数据恢复-raid5故障导致上层oracle数据库故障的数据恢复案例
服务器数据恢复环境: 一台服务器中有一组由24块FC硬盘组建的raid5磁盘阵列,linux操作系统+ext3文件系统,服务器上层部署有oracle数据库。 服务器故障&检测: raid5阵列中有两块硬盘出现故障掉线,导致服务器上层卷无法挂载,oracle数据库无法正常使用。 通过管理后台查看服务器中硬盘的状态,显示有两块硬盘处于离线状态。
|
4月前
|
Oracle 关系型数据库 数据管理
.NET医院检验系统LIS源码,使用了oracle数据库,保证数据的隔离和安全性
LIS系统实现了实验室人力资源管理、标本管理、日常事务管理、网络管理、检验数据管理(采集、传输、处理、输出、发布)、报表管理过程的自动化,使实验室的操作人员和管理者从繁杂的手工劳作中解放出来,提高了检验人员的工作效率和效益,降低了劳动成本和差错发生率。
|
4月前
|
SQL Oracle 关系型数据库
[已解决]使用sqlplus连接oracle,提示ORA-01034和ORA-27101
[已解决]使用sqlplus连接oracle,提示ORA-01034和ORA-27101
55 0
|
4月前
|
Oracle 小程序 关系型数据库
laravel5.8(十四)连接oracle数据库
首先确定你的PHP已经支持oracle数据库的链接。PHP需要安装OCI8扩展。 确定PHP可以链接ORACLE数据库之后。我们使用composer安装laravel支持oracle链接的插件 yajra/laravel-oci8 欢迎访问个人博客 guanchao.site 欢迎访问我的小程序:打开微信->发现->小程序->搜索“时间里的” 一:使用composer安装 yajra/laravel-oci8 1 :运行如下命令: bash 复制代码 composer require yajra/laravel-oci8 2 :安装过程中可能会报错,不要纠结那些报错,最简单的解决办法:
67 0
|
4月前
|
Oracle 关系型数据库 Python
python连接oracle12c
python连接oracle12c
34 0