9.2.5 Configuring a Naming Method

The listener name alias specified for the LOCAL_LISTENER or REMOTE_LISTENER initialization parameters, or LISTENER attribute can be resolved using a tnsnames.ora file. For example, a listener can be defined in the init.ora file as the following:

LOCAL_LISTENER = (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1421)) 

To use an alias for the listener, it can be defined in the init.ora and the tnsnames.ora files as follows:

  • In the init.ora file:

    LOCAL_LISTENER = listener_sales1 
    
  • In the tnsnames.ora file:

    listener_sales1 = (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1421)) 
    

The CONNECT_DATA information should not be included in the network service entry in the tnsnames.ora file. However, Oracle Enterprise Manager Cloud Control and Oracle Net Manager cannot configure a tnsnames.ora file without the CONNECT_DATA information. To use listener name aliases, Oracle recommends you modify the tnsnames.ora file using a text editor.

Note:

  • Multiple addresses are supported, but connect-time failover and client load balancing features are not supported.

  • If the listener alias specified in the LOCAL_LISTENER parameter is invalid or not resolved, then the LREG process does not allow the database to start. The following errors occur:

    ORA-00119: invalid specification for system parameter 
               LOCAL_LISTENER
    ORA-00132: syntax error or unresolved network name '%s'

See Also:

Enabling Advanced Features of Oracle Net Services for additional information about multiple address configuration