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.

Tuesday, January 3, 2012

Oracle RAC patch 11.2.0.3 quit due to fatal error Unable to obtain network interface list from Oracle ClusterwarePRCT-1302 : The "with" has an invalid

##bug OIFCFG Reports PRIF-30 after Successful Upgrade to 11gR2 Grid Infrastructure [ID 983718.1] ##
## bug 8632280 ###
olive /dbaadm/bu/bin/patch/patchset11203/GI/grid$ oifcfg getif
nxge1 162.106.225.0 global cluster_interconnect
Only in OCR: nxge0 162.106.114.0 global public
PRIF-30: Network information in OCR profile needs to be synced with GPnP profile
olive /dbaadm/bu/bin/patch/patchset11203/GI/grid$ oifcfg delif -global nxge1
olive /dbaadm/bu/bin/patch/patchset11203/GI/grid$ oifcfg setif -global nxge0/162.106.114.0:public
olive /dbaadm/bu/bin/patch/patchset11203/GI/grid$ oifcfg getif
nxge0 162.106.114.0 global public

RAC commands crsctl and srvctl

#commands used often
#/u01/app/11.2.0/grid/bin/srvctl add scan_listener
#/u01/app/11.2.0/grid/bin/srvctl start scan_listener
#/u01/app/11.2.0/grid/bin/ocrconfig -export /home/oragrid/install/ocrconfig.dump
#/u01/app/11.2.0/grid/bin/srvctl remove nodeapps
#/u01/app/11.2.0/grid/bin/srvctl add nodeapps -n oak -A oak-vip/255.255.255.0
#/u01/app/11.2.0/grid/bin/srvctl add nodeapps -n olive -A olive-vip/255.255.255.0
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.LISTENER_SCAN1.lsnr -o oragrid
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.LISTENER_SCAN2.lsnr -o oragrid
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.eons -o oragrid
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.gsd -o oragrid
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.ons -o oragrid
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.net1.network -u 'user:oragrid:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.net1.network -x 'user:oracrs:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.oak.vip -x 'user:oracrs:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.oak.vip -u 'user:oragrid:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.olive.vip -x 'user:oracrs:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.olive.vip -u 'user:oragrid:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.scan1.vip -x 'user:oracrs:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.scan1.vip -u 'user:oragrid:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.scan2.vip -x 'user:oracrs:r-x'
#/u01/app/11.2.0/grid/bin/crsctl setperm resource ora.scan2.vip -u 'user:oragrid:r-x'