Oracle database extended discovery pattern: lsrnctl fails with TNS-01101 => missing SI.listen_tcp_sockets => sql queries not executed => missing database nodes.

Version 3
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Discovery


    COMPONENT:

    BMC Discovery 11.1


    APPLIES TO:

    ADDM/Discovery, all versions



    PROBLEM:

    When the Oracle database extended pattern runs the command "lsnrctl", it fails with this error:

      ############################################################################   
    ORACLE_HOME=/xxxxxx/pkgs/linux/intel/oracle/11.2.0.4.x86_64; export ORACLE_HOME; /xxxxxx/pkgs/linux/intel/oracle/11.2.0.4.x86_64/bin/lsnrctl status <service name>   
     
    LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-SEP-2017 08:11:17   
     
    Copyright (c) 1991, 2013, Oracle. All rights reserved.   
     
      TNS-01101: Could not find service name <service name> 
    ############################################################################  
      
    The logical chain of consequences from this is:  missing SI.listen_tcp_sockets => SQL queries not executed => missing database nodes.      

     


    CAUSE:

    tnsnames.ora is not in the default folder and the variable TNS_ADMIN is not set accordingly in the profile of the user account that is used to scan the host


    SOLUTION:

    Solution 1 : Identify the user that executes the Oracle process and rescan the host with this user account. Most of the time, this user has the TNS_ADMIN variable set in its profile.

    Solution 2 : Set the TNS_ADMIN system variable in the profile of the user account that is used to scan the host running the database 

    More details:
    https://docs.oracle.com/cd/B28359_01/network.111/b28317/tnsnames.htm#NETRF259
    "By default, tnsnames.ora is located in the $ORACLE_HOME/network/admin directory on UNIX operating systems and in the %ORACLE_HOME%\network\admin directory on Windows operating systems. tnsnames.ora can also be stored the following locations:
    The directory specified by the TNS_ADMIN environment variable or registry value"

    When tnsnames.ora is not in the default folder and TNS_ADMIN is not set, TNS-01101 and the consequences above are expected. If TNS_ADMIN is set to <custom folder>, the expected LSNRCTL output is below:

        ########################################################################################## 
        LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-SEP-2017 08:17:42 

        Copyright (c) 1991, 2013, Oracle. All rights reserved. 

        Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=<service name>)) 
        STATUS of the LISTENER 
        ------------------------ 
        Alias <service name> 
        Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production 
        Start Date 06-MAY-2017 11:09:29 
        Uptime 122 days 21 hr. 8 min. 12 sec 
        Trace Level off 
        Security ON: Local OS Authentication 
        SNMP OFF 
        Listener Parameter File <custom folder>/listener.ora 
        Listener Log File /etrade/orabase/diag/tnslsnr/<hostname>/<service name>/alert/log.xml 
        Listening Endpoints Summary... 
        (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=<service name>))) 
        (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<hostname>)(PORT=1634))) 
        Services Summary... 
        Service "<service name>" has 1 instance(s). 
        Instance "<service name>", status READY, has 1 handler(s) for this service... 
        The command completed successfully 

        ########################################################################################## 
     


    Article Number:

    000143199


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles