My Oracle Support Banner

ODA - Setting LISTENER_NETWORKS Using Tnsnames.ora Under $TNS_ADMIN Does Not Work Properly (Doc ID 3073766.1)

Last updated on FEBRUARY 28, 2025

Applies to:

Oracle Database Appliance Software - Version 19.11.0.0.0 ODA and later
Oracle Cloud Infrastructure - Exadata Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Gen 2 Exadata Cloud at Customer - Version N/A and later
Information in this document applies to any platform.

Symptoms

tnsnames.ora under $TNS_ADMIN is not recognized when creating a new DB in an ODA environment.
Therefore, an event occurs in which LISTENER_NETWORKS cannot be set correctly using the information in tnsnames.ora.

<What the customer wants to achieve>

As a countermeasure for (Doc ID 2662005.1), I want each node to be able to recognize only its own IP address.
As a countermeasure, we implemented the following.

1. Write the following in tnsnames.ora.

  --Node1
    <LOCAL_LISTENER_NAME>= (ADDRESS = (PROTOCOL = TCP)(HOST = XXX.XX.X.XX1)(PORT = 1521))

  --Node2
    <LOCAL_LISTENER_NAME>= (ADDRESS = (PROTOCOL = TCP)(HOST = XXX.XX.X.XX2)(PORT = 1521))


2. Since there is a shared ORACLE_HOME, set the following environment variable to place tnsnames.ora locally.

  Set the following in the oracle user's .bash_profile.
    export TNS_ADMIN=<ODA_ORABASE>/oracle/admin/network

  Also set TNS_ADMIN for the DB using setenv.
    srvctl setenv database -db XXXXX -t TNS_ADMIN=<ODA_ORABASE>/oracle/admin/network


3. Set LISTENER_NETWORKS.

  alter system set LISTENER_NETWORKS='((NAME=net1)(LOCAL_LISTENER=<LOCAL_LISTENER_NAME>))', '((NAME=net1)(REMOTE_LISTENER=xxxxxx-scan:1521))' scope=both;

  *After the above settings, restart the DB to reflect the settings.


Normally, the above settings will work without problems.
However, for some reason, even if you take the above measures on a newly created database, <LOCAL_LISTENER NAME> is not recognized correctly and the service is not registered with the local listener.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.