Connect String Specific For An Instance (RAC)

In cluster environments, if we connect using connect string or JDBC, we usually connect to a public address that leads us to some of the nodes in the cluster. Sometimes We need to go to a particular node, from applications (of course, you can do this by defining preferred affinity and services) or as in my case for administration issues, where You need to work on a particular node.

Since version 11, if I am not wrong, the connect string includes the parameter instance_name, an example we can see below for a cluster of three nodes, with this we can go directly to the node we need.

sap_1.domain.es =
(DESCRIPTION =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.public.com)(PORT = 5671))
  )
  (CONNECT_DATA =
    (SERVICE_NAME = SAP)
    (INSTANCE_NAME=SAP_1)
  )
)

sap_2.domain.es =
(DESCRIPTION =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.public.com)(PORT = 5671))
  )
  (CONNECT_DATA =
    (SERVICE_NAME = SAP)
    (INSTANCE_NAME=SAP_2)
  )
)

sap_3.domain.es =
(DESCRIPTION =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.public.com)(PORT = 5671))
  )
  (CONNECT_DATA =
    (SERVICE_NAME = SAP)
    (INSTANCE_NAME=SAP_3)
  )
)

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s