TNS-12560: TNS:protocol adapter error 小记

虚拟机环境:

OS:RedHat 5.6

DB:Oracle 10g 10.2.0.1

在虚拟机里装好Oracle 10g之后,客户端无法连接,提示“TNS-12560: TNS:protocol adapter error”

 

tnsping不通,显示如下:

C:\>tnsping ts

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 13-DEC-
011 13:08:05

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

Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS =(PROTOCOL = TCP)
HOST = oratest)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ts.oracle.com)))
TNS-12560: TNS:protocol adapter error

 

在虚拟机本地认证是通过的:

 

查看了listener.ora和tnsnames.ora都没问题。最后把RedHat的1521端口打开,客户端就可以连通了

 

打开1521端口如下:

 

 

 

 

 

 

可以tnsping通了

C:>tnsping ts

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 13-DEC-
011 13:09:59

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

Used parameter files:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS =(PROTOCOL = TCP)
HOST = oratest)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ts.oracle.com)))
OK (40 msec)

 

 

 

 


你可能感兴趣的:(Oracle,基础知识)