os是Red Hat Enterprise Linux AS release 3 (Taroon)
服务器启动和关闭tns均正常,如下:
[oracle@sysrpt oracle]$ lsnrctl stop
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 13-JAN-2006 08:58:05
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.59)(PORT=1521)))
The command completed successfully
[oracle@sysrpt oracle]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 13-JAN-2006 08:58:09
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /opt/oracle/product/9.2.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /opt/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.3.59)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.59)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 13-JAN-2006 08:58:09
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /opt/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.3.59)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "sysrpt" has 1 instance(s).
Instance "sysrpt", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@sysrpt oracle]$ lsnrctl status
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 13-JAN-2006 09:11:29
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.59)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 13-JAN-2006 08:58:09
Uptime 0 days 0 hr. 13 min. 20 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /opt/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.3.59)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "sysrpt" has 2 instance(s).
Instance "sysrpt", status UNKNOWN, has 1 handler(s) for this service...
Instance "sysrpt", status READY, has 1 handler(s) for this service...
The command completed successfully
在服务器上tnsping是通的,并且可以连上,如下:
[oracle@sysrpt admin]$ tnsping 10.1.3.59
TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 13-JAN-2006 09:22:28
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=10.1.3.59))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.3.59)(PORT=1521)))
OK (10 msec)
[oracle@sysrpt admin]$ sqlplus "system/system@DB59"
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Jan 13 09:22:32 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL>
但在我本机的客户端上无法tnsping通,但可ping通,如下:
C:\Documents and Settings\shiyihai>tnsping 10.1.3.59
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 13-1月 -2006 09:20:38
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
C:\oracle\ora92\network\admin\sqlnet.ora
已使用 HOSTNAME 适配器来解析别名
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=10.1.3.59))(ADDRESS=(PROTOCOL=
TCP)(HOST=10.1.3.59)(PORT=1521)))
TNS-12560: TNS: 协议适配器错误
C:\Documents and Settings\shiyihai>ping 10.1.3.59
Pinging 10.1.3.59 with 32 bytes of data:
Reply from 10.1.3.59: bytes=32 time<1ms TTL=62
Reply from 10.1.3.59: bytes=32 time<1ms TTL=62
Ping statistics for 10.1.3.59:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\Documents and Settings\shiyihai>