Search code examples
oracle-databaseoracle9i

How to check oracle database network status


Can anyone please tell me method for checking oracle data base network status?


Solution

  • @Cybernate response is fairly easy from a command prompt:

    For DB that is running

    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)
    

    For db that is not running

    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
    

    Alternatively you could just use sql*plus or any other program to try to connect.