oracle not turn on,how to turn on the tracing ?

当我用lsnrctl status 查询db port status 时,发现:

[oracle@test admin]$ lsnrctl status testdb

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 06-AUG-2009 01:27:27

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(SID_NAME=testdb)(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROCTEST)))

STATUS of the LISTENER

------------------------

Alias                     testdb

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                05-AUG-2009 05:49:53

Uptime                    0 days 19 hr. 37 min. 33 sec

Trace Level               offSecurity                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/oracle/product/10.2.0/db_3/network/admin/listener.ora

Listener Log File         /u01/app/oracle/oracle/product/10.2.0/db_3/network/log/testdb.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROCTEST))(SID_NAME=testdb))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1666))(SID_NAME=testdb))

The listener supports no services

The command completed successfully

[oracle@test admin]$ tail -15 sqlnet.logFatal NI connect error 12514, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1666))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=testdb)(CID=())))

VERSION INFORMATION:

TNS for Linux: Version 10.2.0.1.0 - Production

TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production

Time: 05-AUG-2009 05:07:10

Tracing not turned on.-------> how to turn on this tracing?-----------------  Tns error struct:                                                           |

ns main err code: 12564                                                   |

TNS-12564: TNS:connection refused                                         |

ns secondary err code: 0                                                  |

nt main err code: 0                                                       |

nt secondary err code: 0                                                  |

nt OS err code: 0

|

------->方法是:vi sqlnet.ora 添加以下红色部分的配置:

[oracle@test admin]$ cat sqlnet.ora # sqlnet.ora Network Configuration File: /u01/app/oracle/oracle/product/10.2.0/db_3/network/admin/sqlnet.ora

# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES,hostname)trace_level_client=16

trace_timestamp_client=true

trace_unique_client=on

trace_level_client 这个参数Indicates the level at which the client program is to be traced.

# Available Values:

#       0 or OFF - No Trace output

#       4 or USER - User trace information

#       10 or ADMIN - Administration trace information

#       16 or SUPPORT - Worldwide Customer Support trace information

###########################

#trace_unique_client = ON

###########################

#

#Possible values: {ON, OFF}

#Default: OFF

#

#Purpose: Used to make each client trace file have a unique name to

#         prevent each trace file from being overwritten by successive

#         runs of the client program

你再次查看sqlnet.log:

[ admin]$ tail -15 sqlnet.log

Fatal NI connect error 12505, connecting to:

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1666))(CONNECT_DATA=(SERVER=DEDICATED)(SID=testdb)(CID=())))

VERSION INFORMATION:

TNS for Linux: Version 10.2.0.1.0 - Production

TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.1.0 - Production

Time: 06-AUG-2009 02:45:00

Tracing to file: /u01/app/oracle/oracle/product/10.2.0/db_3/network/admin/cli_1861.trc  Tns error struct:

ns main err code: 12564

TNS-12564: TNS:connection refused

ns secondary err code: 0

nt main err code: 0

nt secondary err code: 0

nt OS err code: 0

或许trace log会对你分析问题提供一些线索。

值得注意的是,每当你连一次DB,就会产生一个trace log file,所以,当你找到并解决问题会,可以将tracing log 关掉,不然会产生很多的log file.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值