Re: TNS alias synonym entry

From: Jared Still <jkstill_at_gmail.com>
Date: Wed, 27 May 2020 20:27:54 -0700
Message-ID: <CAORjz=OP36X__oAPNbSC6VCKPdCgpu_ydsXj2HQkAG93w4kZ7A_at_mail.gmail.com>



Aliases can be made directly in LDAP, as it does have an alias type.

I believe Mark's blog explains it, as he has already mentioned.

The Oracle OID (Oracle Internet Directory) documentation also shows how to do this, as that is where I learned to do it.

My LDAP server is still running and working fine after several years, but I tend to use EZ Connect for the most part anymore.

Jared

On Tue, May 26, 2020 at 07:09 Luis Claudio Dias dos Santos < lsantos_at_pobox.com> wrote:

> 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...
>
>
>
>
> --
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Principal Consultant at Pythian
Oracle ACE Alumni
Pythian Blog http://www.pythian.com/blog/author/still/ Github: https://github.com/jkstill

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 28 2020 - 05:27:54 CEST

Original text of this message