连接异机上的oracle数据库,将其tns 配置参数拷贝到本机的tnsnames.ora中,tnsping 测试的时候,遇到 TNS-03505: 无法解析名称
C:\Users\aaaa>tnsping test
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-11月-2011 12:36:05
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
D:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
TNS-03505: 无法解析名称
解决方法:
检查tns名称之前是否有空格,去掉空格,重新加载,并测试
C:\Users\aaaa>lsnrctl reload
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-11月-2011 12:41:41
Copyright (c) 1991, 2010, Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
命令执行成功
C:\Users\aaaa>tnsping test
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-11月-2011 12:41:44
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
D:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.250.7.171)(PORT = 1521))) (C
OK (30 毫秒)
C:\Users\aaaa>
C:\Users\aaaa>