TNS alias synonym entry

From: Luis Claudio Dias dos Santos <lsantos_at_pobox.com>
Date: Tue, 26 May 2020 11:07:03 -0300
Message-ID: <CAPWdmV_7QgpuEfrd9QhO+Wx3P2EctW5Pu=5+WZbvNi7WY2pvUg_at_mail.gmail.com>



Is is possible to define a TNS alias *synonym*? Despite the confuse it seems, I will explain.

We have a LDAP server serving most of our TNS names resolutions.

But in a specific case I want a special TNS entry, called MONIT, be resolved different in different servers. So I can't use LDAP.

The most usual way to do is to create a FULL TNS entry, in each defined servers, with different MONITs entries. For example:

*server 1:*

> *MONIT =*
> * (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = someserver01)(PORT =
> 1521))*
> * (CONNECT_DATA =*
> * (SERVER = DEDICATED)*
> * (SERVICE_NAME = DB01)*
> * )** )*

*server 2:*

> *MONIT =*
> * (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = someserver02)(PORT =
> 1521))*
> * (CONNECT_DATA =*
> * (SERVER = DEDICATED)*
> * (SERVICE_NAME = DB02)*
> * )** )*

But this entries, for DB01 and DB02 service names, are well defined on LDAP server with some other alias:

*$ tnsping DB01*

> *Used LDAP adapter to resolve the alias*
> *Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
> someserver01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
> (SERVICE_NAME = DB01)))**OK (10 msec) *

> *$ tnsping DB02*
> *Used LDAP adapter to resolve the alias*
> *Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
> someserver02)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
> (SERVICE_NAME = DB02)))**OK (10 msec)*

SO, I want locally, on TNSNAMES.ORA, with of course SQLNET.ORA containing *NAMES.DIRECTORY_PATH=
(TNSNAMES,LDAP)*, the following in local TNSNAMES.ORA:

*server 1:*

*MONIT = DB01* *server 2:*

*MONIT = DB02* But this does not work...

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 26 2020 - 16:07:03 CEST

Original text of this message