有谁能告诉我检查oracle数据库网络状态的方法?
答案 0 :(得分:1)
在命令提示符下,@ Cybernate响应非常简单:
对于正在运行的数据库
C:\Users\user_name\tnsping db_name_thats_running
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 17-JUN-2011 10:17:25
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oracle\ora11\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ######)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = db_name_thats_running)))
OK (80 msec)
对于未运行的db
C:\Users\user_name\tnsping db_name_thats_not_running
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 17-JUN-2011 10:17:15
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\oracle\ora11\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=fe80::b1d0:b145:b4a0:9b76%11)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=####)(PORT=1521)))
TNS-12541: TNS:no listener
或者你可以使用sql * plus或任何其他程序来尝试连接。
答案 1 :(得分:0)
如果您有权访问运行侦听器和数据库的主机,则可以使用 tnslsnr 命令检查侦听器状态。