TNS-12535错误处理

装好oracle后,手动tnsping sid 发现tns-12535

C:\Users\DRAGON>tnsping DRAGON
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-8月
2015 23:10:51
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
已使用的参数文件:
E:\app\DRAGON\product\11.2.0\client_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.
68.56.101)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dragon)))
TNS-12535: TNS: 操作超时

连接超时,可以从这几个方面考虑:

1,网络是否通
2,tnsname配置是否配置正确
3,oracle监听是否启动
4,linux 防火墙是否设置

1,网络是通的

C:\Users\DRAGON>ping 192.168.56.101
正在 Ping 192.168.56.101 具有 32 字节的数据:
来自 192.168.56.101 的回复: 字节=32 时间=1ms TTL=64
来自 192.168.56.101 的回复: 字节=32 时间<1ms TTL=64
来自 192.168.56.101 的回复: 字节=32 时间<1ms TTL=64
192.168.56.101Ping 统计信息:
    数据包: 已发送 = 3,已接收 = 3,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 1ms,平均 = 0ms

2,在服务器上是可以tnsping通的

[oracle@dragon ~]$ tnsping DRAGON
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 06-AUG-2015 23:17:01
Copyright (c) 1997, 2009, Oracle.  All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.101)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dragon)))
OK (0 msec)

3,监听已经启动成功

[oracle@dragon ~]$ lsnrctl status;
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-AUG-2015 23:17:30
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.101)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                06-AUG-2015 22:45:31
Uptime                    0 days 0 hr. 31 min. 59 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dragon/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.101)(PORT=1521)))
Services Summary...
Service "dragon" has 1 instance(s).
  Instance "dragon", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

4,查看防火墙状态,发现防火墙启用的

[root@dragon ~]# service iptables status;
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         

关闭防火墙

[root@dragon ~]# service iptables stop;
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

在用tnsping ,已经成功了

C:\Users\DRAGON>tnsping DRAGON
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-8月 -
2015 23:20:01
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
已使用的参数文件:
E:\app\DRAGON\product\11.2.0\client_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1
68.56.101)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = dragon)))
OK (10 毫秒)

你可能感兴趣的:(oracle,oracle,basic)