[英]tnsping not working for //SERVER:PORT/SID format
This Works这个作品
app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping app_test app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping app_test
TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 08-SEP-2015 01:01:57用于 IBM/AIX RISC 系统/6000 的 TNS Ping 实用程序:版本 10.2.0.4.0 - 生产于 08-SEP-2015 01:01:57
Copyright (c) 1997, 2007, Oracle. All rights reserved.版权所有 (c) 1997、2007、Oracle。保留所有权利。
Used parameter files: /u01/home/app/oracle/product/10.2.network/admin/sq.net.ora使用的参数文件:/u01/home/app/oracle/product/10.2.network/admin/sq.net.ora
Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = monger) (Port = 1531))) (CONNECT_DATA = (SID = app_test))) OK (10 msec)使用 TNSNAMES 适配器解析别名 Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = monger) (Port = 1531))) (CONNECT_DATA = (SID = app_test))) OK (10 msec )
But this does not.但事实并非如此。 Why?为什么?
app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping //monger:1531/app_test app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping //monger:1531/app_test
TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 08-SEP-2015 00:59:16用于 IBM/AIX RISC System/6000 的 TNS Ping 实用程序:版本 10.2.0.4.0 - 生产于 08-SEP-2015 00:59:16
Copyright (c) 1997, 2007, Oracle. All rights reserved.版权所有 (c) 1997、2007、Oracle。保留所有权利。
Used parameter files: /u01/home/app/oracle/product/10.2.network/admin/sq.net.ora使用的参数文件:/u01/home/app/oracle/product/10.2.network/admin/sq.net.ora
TNS-03505: Failed to resolve name TNS-03505: 名称解析失败
app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>ping monger PING monger.corp.com: (10.140.2.74): 56 data bytes 64 bytes from 10.140.2.74: icmp_seq=0 ttl=255 time=0 ms 64 bytes from 10.140.2.74: icmp_seq=1 ttl=255 time=0 ms 64 bytes from 10.140.2.74: icmp_seq=2 ttl=255 time=0 ms ^C ----monger.corp.com PING Statistics---- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0/0/0 ms app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>ping monger PING monger.corp.com: (10.140.2.74): 56 个数据字节 64 个字节来自 10.140.2.74: icmp_seq=0 ttl=255 time=0 ms 64 bytes from 10.140.2.74: icmp_seq=1 ttl=255 time=0 ms 64 bytes from 10.140.2.74: icmp_seq=2 ttl=255 time=0 ms ^C ---- monger.corp.com PING 统计数据----发送了 3 个数据包,接收了 3 个数据包,0% 丢包往返 min/avg/max = 0/0/0 ms
app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping //10.140.2.74:1531/app_test app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>tnsping //10.140.2.74:1531/app_test
TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 08-SEP-2015 00:59:40用于 IBM/AIX RISC System/6000 的 TNS Ping 实用程序:版本 10.2.0.4.0 - 生产于 08-SEP-2015 00:59:40
Copyright (c) 1997, 2007, Oracle. All rights reserved.版权所有 (c) 1997、2007、Oracle。保留所有权利。
Used parameter files: /u01/home/app/oracle/product/10.2.network/admin/sq.net.ora使用的参数文件:/u01/home/app/oracle/product/10.2.network/admin/sq.net.ora
TNS-03505: Failed to resolve name app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/> TNS-03505: 无法解析名称 app @ [server: /u01/home/apli/app/trx/appS_Apps/appS_Apps/logs ]:/>
tnsping
is used to test yout network configuration via tnsnames.ora
. tnsping
用于通过tnsnames.ora
测试您的网络配置。 I doesn't make sense to call it with ips and ports. 用ips和port来称呼它是没有意义的。 See also here: http://docs.oracle.com/cd/E11882_01/network.112/e41945/connect.htm#NETAG357 另请参阅此处: http : //docs.oracle.com/cd/E11882_01/network.112/e41945/connect.htm#NETAG357
On Windows with Oracle 12, it can be used as wanted. Windows 和 Oracle 12,随便用。
tnsping host:port/servicename
The command line forms an EZConnect Oracle SQL connection string.命令行 forms 和 EZConnect Oracle SQL 连接字符串。 Note that no leading slashes used in the system name devhost.corp.company.com.请注意,系统名称 devhost.corp.company.com 中没有使用前导斜杠。
PS C:\Users\user1> tnsping devhost.corp.company.com:12021/devdb
TNS Ping Utility for 32-bit Windows: Version 12.2.0.1.0 - Production on 14-NOV-2022 10:29:25
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
C:\Oracle\product\12.2.0\client_1\network\admin\sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=devdb))(ADDRESS=(PROTOCOL=TCP)(HOST=10.50.206.21)(PORT=12021)))
OK (70 msec)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.