Re: Can you connect to a vip on a down RAC node with service name?

From: Harel Safra <harel.safra_at_gmail.com>
Date: Thu, 12 Apr 2018 11:14:24 +0300
Message-ID: <CA+UC=5GRybHKj4SUXfHOA_j2Rs8aOkn492LarQ7c63WNWpVTkA_at_mail.gmail.com>



It's not supposed to work, and you've hit the cause - no listener is configured on host19 to listen on host20-vip. If you're using vips to connect to need to list all if them in the client naming configuration to allow the client to fail over to another server in case of errors.

The reason that clusterware migrates the vip address over to the other host is to allow client failover to happen quickly. The client tries to connect to the listener on host20-vip, gets an error and fails over to host19-vip that works. If the vip weren't failed over to the surviving host, clients trying to connect to host20-vip will have to wait until TCP timeout to detect the error and try to connect to host19-vip and that takes much longer.

Harel

On Wed, Apr 11, 2018 at 10:22 PM, Sundar Mahadevan < sundarmahadevan82_at_gmail.com> wrote:

> Hi All,
> Greetings. I was working on something and was interested to know if I can
> connect to vip on a down RAC node using just service name? MYDB is the
> database with instances MYDB1 on host19 and MYDB2 on host20 with all
> cluster services down on host20 and all services including host20-vip
> failed over to host19. Ping to host19-vip and host20-vip work fine. Version
> is 12.1.0.2 on RHEL 64 bit.
>
> Following tns entries work:
>
> Using host19-vip and SERVICE_NAME=MYDB and INSTANCE_NAME=MYDB1
>
> MYDB =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = host19-vip.omers.com)(PORT = 1524))
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = MYDB)
> (INSTANCE_NAME = MYDB1)
> )
> )
>
> Using host20-vip and host19-vip and SERVICE_NAME=MYDB and
> INSTANCE_NAME=MYDB1
>
> MYDB =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = host20-vip.omers.com)(PORT = 1524))
> (ADDRESS = (PROTOCOL = TCP)(HOST = host19-vip.omers.com)(PORT = 1524))
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = MYDB)
> (INSTANCE_NAME = MYDB1)
> )
> )
>
> Using host20-vip and host19-vip and SERVICE_NAME=MYDB. NO
> INSTANCE_NAME=MYDB1
>
> MYDB =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = host20-vip.omers.com)(PORT = 1524))
> (ADDRESS = (PROTOCOL = TCP)(HOST = host19-vip.omers.com)(PORT = 1524))
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = MYDB)
> )
> )
>
> Following do not work. Receiving error No listener.
>
> Using host20-vip and SERVICE_NAME=MYDB. NO INSTANCE_NAME=MYDB1
>
> MYDB =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = host20-vip.omers.com)(PORT = 1524))
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = MYDB)
> )
> )
>
> Using host20-vip and SERVICE_NAME=MYDB and INSTANCE_NAME=MYDB1
>
> MYDB =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = host20-vip.omers.com)(PORT = 1524))
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = MYDB)
> (INSTANCE_NAME = MYDB1)
> )
> )
>
> Is this even supposed to work considering the listener does not even
> listen on host20-vip?
>
> Is this why scan listener came into existence? What am i missing here?
>
>
> Thanks to the list for your assistance.
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 12 2018 - 10:14:24 CEST

Original text of this message