Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Which Host and Service to use in TNSNAMES

JimboApr 1 2014 — edited Apr 4 2014


Hi,

I have created a 2 node ( LAB4 LAB5 ) cluster in 11gR2 GRid Infrastructure, which currently holds my clustered ASM Instance

I am trying to ascertain which Host and Service Name setting I should be using on a client in order to allow me to connect to ASM both as a local connection on the node and as a cluster connection.

I am tresting 3 types of TNS connection below

+ASM1 - a simple connection to the ASM instance drectly from LAB4 as if it were not clustered

+ASM1_VIP - I think this is the old 10g method of connecting to the cluster ?

+ASM1_SCAN - I think this is the new 11gR2 way of connecting to the cluster ?

From my LAB4 node

grid1[+ASM1]>lsnrctl stat

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-APR-2014 16:15:35

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-APR-2014 09:53:53
Uptime                    0 days 6 hr. 21 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /home/app/oracle/diag/tnslsnr/lab4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.5)(PORT=1521)))                         THIS IS MY PUBLIC IP for this Node
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.97)(PORT=1521)))                         THIS IS MY VIP for this Node
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
The command completed successfully

The other Node ( LAB5 ) Listener shows

Service "+ASM" has 1 instance(s).

  Instance "+ASM1", status READY, has 1 handler(s) for this service...

My server hosts file contains

192.168.0.5  lab4 lab4.nms
192.168.0.97 lab4-vip lab4-vip.nms
192.168.2.97 lab4-private lab4-private.nms

192.168.0.6  lab5 lab5.nms
192.168.0.98 lab5-vip lab5-vip.nms
192.168.2.98 lab5-private lab5-private.nms

192.168.0.100 cluster1-scan
192.168.0.101 cluster1-scan
192.168.0.102 cluster1-scan

* I am not using DNS / GNS - hence the 3 static entries for the SCAN

So I have set my client TNSNAMES as follws -

Are these right for the 3 types of connection I mentioned at the beginning of this forum

#ASM Instance on LAB4 via Public IP

+ASM1=
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=lab4)
      (PORT=1521)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=+ASM1)
    )
  )

#ASM Instance on LAB4 via Public VIP i.e. the old 10g method to connect to a cluster

+ASM1_VIP=
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=lab4-vip)
      (PORT=1521)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=ASM)
    )
  )


#ASM Instance on Cluster via Public Cluster SCAN i.e. the new 11g method to connect to a cluster

+ASM_SCAN=
  (DESCRIPTION=
    (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=cluster1-scan)
      (PORT=1521)
    )
    (CONNECT_DATA=
      (SERVICE_NAME=ASM)
    )
  )

The good thing is that a TNSPING from my client to all 3 entries above, succeed

Q1. Does Service Name ignore '+' i.e. is that why for the +ASM1_VIP and _ASM_SCAN entry above, I was able to put ASM ni the SERVICE_NAME and not +ASM ?

Q2. I presume for the 10g method - that the Service Name should indeed be ASM and not ASM1 ?

Q3. If LAB4 were to fail, would my other node, LAB5, inherit the VIP of LAB4

thanks,

Jim

This post has been answered by Tom321 on Apr 2 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2014
Added on Apr 1 2014
14 comments
5,710 views