Wednesday, January 11, 2012

11R2 RAC listener and service name clarify

1. Service name
In Oracle RAC you should not change service_names in initxxx.ora parameter file. You need use servctl utility to add,remove a service name and the utility will update parameter file.http://docs.oracle.com/cd/E11882_01/rac.112/e17264/configwlm.htm#CHDJIAJH

2. Listener
From 11R2 start using SCAN listener. there is one bug that DBCA does not recognize parameter format like orarac1-scan:1521.
The workaround will be
a) set remote_listener to '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=162.106.114.130)(PORT=1521)))(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=162.106.114.131)(PORT=1521))))' which applied to database running under version 11R1 or before
b) set remote_listener to 'orarac1-scan:1521' in sqlplus after database is created.

3. client connection process
a) a client contact listener listed in tnsnames.ora. 11R2 client can handle multiple address with a name but the version before does not.
b)make hand shake with the listener(scan listener), if it fails client 11R1 or before will fail. 11r2 client will try next ip returned by scan name and so on.
c) if client success make hand shake with scan listener then scan listener will find service registered in RAC and try find a instance which has less workload.
If there is no service registered, it will use information registered in listener which has instance lists.
d) pass connect to that instance(load balancing) or random instance if there is no workload information found in previous step.
e) connection made.

No comments: