Friday, November 4, 2011

Paul Elbow's crsstat script: Improved Formatting of crs_stat on 10g and 11g

Today I found a very helpful script from Paul Elbow's blog to format crsctl output:
My crsstat script: Improved Formatting of crs_stat on 10g and 11g


Labels: , , ,

Tuesday, November 1, 2011

Check 11202 RAC system recorded network interface name


Recently I was required to update our 11202 two nodes RAC on OEL 5.5 public interface name. After interface name change, here are the 2 steps I did to check if the system got the interface name correctly:
[oracle@node2 ~]$
[oracle@node2 ~]$ oifcfg getif
eth3  192.168.206.20  global  cluster_interconnect
bond0  192.168.100.0  global  public


[oracle@node2 ~] more /opt/app/11.2.0/grid/gpnp/linkin2/profiles/peer/profile.xml
IP="192.168.206.20" Adapter="eth3" Use="cluster_interconnect"/>Network id="net2" IP="192.168.100.0" Adapter="bond0" Use="public"/>
:ASM-Profile id="asm" DiscoveryString="/dev/mapper/*" SPFile="+OCR_VOTE/linkincluster/asmparameterfile/registry.253.764469115"/>
CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
ithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
t="gpnp orcl xsi"/>DO5mYZjrYv+5t15UH8zedF0o3O4=
nfo>fyCiD46yDKsjcjpyoFYIuoZ1+sEvE72XPKAOu5gSfLjllUFVgNNM3EW8EiyUhvbmhHgxLcQ5ZL8iTdmhDtun53gbcNVc5RVP82B32WH1qzJUaDLx3MXQsZcO3/wmkyxUo7azsCosrk2WWwYeSqUl4YiArTbv3WPMXwfU9TdFyHM=
reValue>

Labels: ,

Differences between "crsctl .. crs" and "crsctl ... cluster"

I had been puzzled by the differences between "crsctl ... crs" and "crsctl ... cluster", so I decided to look into the differences between them, it turns out that they are clearly explained in the documentation:
Oracle® Clusterware Administration and Deployment Guide
11g Release 2 (11.2)

Part Number E16794-14

E CRSCTL Utility Reference

According to the above doc:

CRSCTL Overview

CRSCTL is an interface between you and Oracle Clusterware, parsing and calling Oracle Clusterware APIs for Oracle Clusterware objects.
Oracle Clusterware 11g release 2 (11.2) introduces cluster-aware commands with which you can perform check, start, and stop operations on the cluster. You can run these commands from any node in the cluster on another node in the cluster, or on all nodes in the cluster, depending on the operation.
You can use CRSCTL commands to perform several operations on Oracle Clusterware, such as:
  • Starting and stopping Oracle Clusterware resources
  • Enabling and disabling Oracle Clusterware daemons
  • Checking the health of the cluster
  • Managing resources that represent third-party applications
  • Integrating Intelligent Platform Management Interface (IPMI) with Oracle Clusterware to provide failure isolation support and to ensure cluster integrity
  • Debugging Oracle Clusterware components



Clusterized (Cluster Aware) Commands

You can run clusterized commands on one node to perform operations on another node in the cluster. These are referred to as remote operations. This simplifies administration because, for example, you no longer have to log in to each node to check the status of the Oracle Clusterware on all of your nodes.
Clusterized commands are completely operating system independent; they rely on the OHASD (Oracle High Availability Services daemon). If this daemon is running, then you can perform remote operations, such as the starting, stopping, and checking the status of remote nodes.
Clusterized commands include the following:
  • crsctl check cluster
  • crsctl start cluster
  • crsctl stop cluster

---crsctl command help shows the following .
crsctl stop cluster -h
Usage:
crsctl stop cluster [[-all]|[-n [...]]] [-f]
Stop CRS stack
where
Default Stop local server
-all Stop all servers
-n Stop named servers
server [...] One or more blank-separated server names
-f Force option


In simple words it work like this.

crsctl stop cluster is equal to crsctl stop crs
crsctl stop cluster -all --> stops clsuterware on ALL nodes.
crsctl stop cluster -n racnode1 stops clusterware on node racnode1.

Labels: , , ,

How to change the public interface name of 11202 RAC


Recently I was asked to work SA to change the public interface name of our 11202 two nodes RAC on Linux 5.5.  After researching Oracle Support notes and confirmation with Oracle Support, following are the steps required to perform this change:
Note: unfortunately at last minute, this change was cancelled, so I didn't have a chance to really test it out. I tested another set of similar steps but failed due to wrong steps execution.

1) set new public network interface name with oifcfg setif -global <..ifname.>
$ $ORA_CRS_HOME/bin/oifcfg setif -global eth0/192.168.100.0:public

2) delete old public network interface name with oifcfg delif -global
$ $ORA_CRS_HOME/bin/oifcfg delif -global bond0

3) voting disks permission needs to stay permenent to be "oracle:oinstall", even after server reboot

4) SHUTDOWN crs
crsctl stop crs

5) perform changes at OS level

6) reboot both servers
Note: Reboot is not essentail. Needed only if SA need that.

7) After server reboot, check voting disks permission to make sure they belong to "oracle:oinstall".
If not, change it back to oracle:oinstall.
Note: this step is not necessary. I put it here because after SA made the interface name change on OS level and rebooted the server, CRS couldn't be started.  After long hours of hard work, it turned out to be the voting disks permission issue. 

8) Restart the clusterware crsctl start crs
Check crs status, if not all online, shutdown force: crsctl stop crs -f, then start it up node by node: crsctl start crs
Note: what are the differences between "crsctl stop/start crs" and "crsctl stop/start cluster"? 
"crsctl stop/start crs" only stop or start one node. 

9) To modify the VIP change while all cluster related services are online (CRS, ASM, db)
a) Gather the existing setup
$ srvctl config nodeapps -a

b) Verify VIP status
$ crsctl stat res -t
- it should show VIPs are ONLINE

$ ifconfig -a

- VIP logical interface is bind to the public network interface

c) Stop the nodeapps resources and all dependent resources (stop ASM/DB instance only required for full outage):
$ srvctl stop instance -d -n
$ srvctl stop vip -n -f

d) Verify VIP is now OFFLINE and the interface is no longer bound to the public network interface

$ crsctl stat res -t

$ ifconfig -a

e) Modifying VIP and Its Associated Attributes
Determine the new VIP IP/subnet/netmask or VIP hostname, make the network change on OS first, ensure the new VIP is registered in DNS or modified in /etc/hosts
(for Unix/Linux). If the network interface is changed, ensure the new interface is available on the server before proceeding with the modification.

f) Modify the VIP resource
network resource can be modified directly via srvctl modify network command.

as root user:
# srvctl modify network -k ] [-S /[/if1[|if2...]]

For example:
New VIP is: 110.11.70.11 racnode1-nvip
new subnet is 110.11.70.0
new netmask is 255.255.255.0
new interface is eth0

# srvctl modify network -k 1 -S 110.11.70.0/255.255.255.0/eth0

Note:
How to tell if VIP is bound or not bound to the public interface from the output of "ifconfig -a"?
Answer: If the public interface is 'eth0' then vip should bound as 'eth0:1'

g) Verify the change
$ srvctl config nodeapps -a

h) Start the vip and other resources
$ srvctl start vip { -n
$ srvctl start instance -d -i

i) Verify the new VIP is ONLINE and bind to the public network interface

$ crsctl stat res -t
$ ifconfig -a

Related Oracle Support Notes:

  1. How to Change Interconnect/Public Network (Interface or Subnet) in Oracle Clusterware [ID 283684.1]
  2. How to Modify Private Network Interface in 11.2 Grid Infrastructure [ID 1073502.1] 
  3. Troubleshooting CRSD Start up Issue [ID 1323698.1]
  4. CRS can not Start After Node Reboot [ID 733260.1]
  5. 10gR2, 11gR1 and 11gR2 Oracle Clusterware (CRS / Grid Infrastructure) & RAC Command (crsctl, srvctl, cluvfy etc) Syntax and Reference [ID 1332452.1]



Labels: , ,

Friday, October 14, 2011

Reviewed Oracle Notes on My Recent 11202 RAC Installation with ASMLib

ASM
  1. ASM 11.2 Configuration KIT (ASM 11gR2 Installation & Configuration, Deinstallation, Upgrade, ASM Job Role Separation (Standalone Only). [ID 1092213.1]
  2. How To Setup ASM on Linux Using ASMLIB Disks, Raw Devices or Block Devices? [ID 580153.1]
  3. Device Checks for ASM Fails with PRVF-5150: Path ORCL: is not a valid path [ID 1210863.1
  4. ASM Technical Best Practices [ID 265633.1]
  5. Master Note for Automatic Storage Management (ASM) [ID 1187723.1]
  6. How to Prepare Storage for ASM [ID 452924.1]
  7. How To Install ASMLIB API via the Unbreakable Linux Network [ID 461718.1]
  8. FAQ ASMLIB CONFIGURE,VERIFY, TROUBLESHOOT [ID 359266.1]
Grid/CRS/VIP
  1. Things to Consider Before Upgrading to 11.2.0.2 Grid Infrastructure [ID 1312225.1]
  2. Oracle De-install Utility - 11g R2 [ID 886184.1]
  3. How To Deinstall/Uninstall Oracle Home In 11gR2? [ID 883743.1]
  4. 11.2.0.2 Patchset Location For Grid Infrastructure And RDBMS. [ID 1223673.1]
  5. Support of Linux and Oracle Products on Linux [ID 266043.1]
  6. Grid And Database Runinstaller - Precheck Fails For Run-Level [ID 1307948.1]
  7. Things to Consider Before Upgrading to 11.2.0.2 Grid Infrastructure [ID 1312225.1]
  8. RAC: Frequently Asked Questions [ID 220970.1]
  9. Linux: PRVF-5449 : Check of Voting Disk location "ORCL:(ORCL:)" failed [ID 1267569.1]
  10. root.sh Fails as the ora.asm resource is not ONLINE or PROTL-16 Reports [ID 1259874.1]
  11. How to Proceed from Failed 11gR2 Grid Infrastructure (CRS) Installation [ID 942166.1]
  12. The listener stops or goes offline randomly due to VIP issue [ID 985170.1]
  13. VIP does not relocate back to the original node starting from 10.2.0.4 and 11.1 even after the public network problem is resolved. [ID 805969.1]
  14. Troubleshooting CRSD Start up Issue [ID 1323698.1]
  15. VIP does not Failover or Network Resource Stays Online after Disconnected Cables for Bond Public Network [ID 1276737.1]
  16. VIP Fails Over and Listener Stops After Short Public Network Hiccup [ID 1333165.1]
  17. Crs Components Are Not Starting After Server Reboot [ID 1152653.1]
  18. Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]
  19. CRS Diagnostic Data Gathering: A Summary of Common tools and their Usage [ID 783456.1]
  20. CRS 10gR2/ 11gR1/ 11gR2 Diagnostic Collection Guide [ID 330358.1]
  21. RAC and Oracle Clusterware Best Practices and Starter Kit (Platform Independent) [ID 810394.1]
  22. Introducing Cluster Health Monitor (IPD/OS) [ID 736752.1]

Labels: , , , ,

Thursday, September 15, 2011

Reviewed Oracle Notes in My Recent 11gR2 RAC installation


  1. Placement of Voting disk and OCR Files in Oracle RAC 10g and 11gR1 [ID 293819.1]
  2. Linux OS Service 'vncserver' [ID 551711.1]
  3. Enable database hosts in Exadata Database Machine for using up2date or yum and vncserver [ID 1234710.1]
  4. How to configure, manage and secure user access to the Linux X server [ID 459029.1]
  5. up2date/YUM - Frequently Asked Questions [ID 604195.1]
  6. 11gR2 Grid Infrastructure ROOT.SH Fails on Second Node after Waiting for 10 Minutes [ID 977026.1]
  7. 11gR2 ohasd Fails to Start [ID 1157905.1]
  8. OHASD Failed to Start: Inappropriate ioctl for device [ID 1069182.1]
  9. How to Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]
  10. Troubleshooting CRSD Start up Issue [ID 1323698.1]
  11. Oracle Grid Infrastructure 11.2.0.2 Installation or Upgrade may fail due to Multicasting Requirement [ID 1212703.1]
  12. CRS root.sh Script Failing on Second Node When MTU Larger than 1500 [ID 1085885.1]
  13. Recommendation for the Real Application Cluster Interconnect and Jumbo Frames [ID 341788.1]
  14. RAC Instances Unable To Start If MTU Size Is Different On Clusterinterconnect Interfaces [ID 300388.1]
  15. Troubleshooting 10g or 11.1 Oracle Clusterware Root.sh Problems [ID 240001.1]
  16. Troubleshooting 11.2 Grid Infastructure Installation Root.sh Issues [ID 1053970.1]
  17. How to Proceed from Failed 11gR2 Grid Infrastructure (CRS) Installation [ID 942166.1]
  18. RAC Assurance Support Team: RAC Starter Kit and Best Practices (Linux) [ID 811306.1]
  19. Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5 [ID 564580.1]
  20. Configuring Raw Devices for Real Application Clusters on Linux [ID 246205.1]
  21. Patch 12311357 - 11.2.0.2.2 GI Patch Set Update (Includes Database PSU 11.2.0.2.2)
  22. README file for OPatch(11.2.0.1.6), the Oracle Interim Patching Tool.
  23. Raw Devices Are Not Visible Through ASM. [ID 743596.1]
  24. How to Prepare Storage for ASM [ID 452924.1]
  25. Oracle ASM and Multi-Pathing Technologies [ID 294869.1]
  26. Announcement on using Raw devices with release 11.2 [ID 754305.1]
  27. Setting up ASM on linux with LVM [ID 292348.1]
  28. Master Note for Automatic Storage Management (ASM) [ID 1187723.1]
  29. ASM 11.2 Configuration KIT (ASM 11gR2 Installation & Configuration, Deinstallation, Upgrade, ASM Job Role Separation. [ID 1092213.1]
  30. How To Setup ASM on Linux Using ASMLIB Disks, Raw Devices or Block Devices? [ID 580153.1]
  31. How to Make Sure that the Raw Devices Have the Right Ownership and Permissions After a Reboot ? [ID 382680.1]
  32. How to Bind RAW devices to Physical Partitions on Linux to be used by ASM [ID 458419.1]

Labels: , ,

Friday, April 1, 2011

11gR2 SCAN FAQ

In 11gR2, Oracle introduced a new feature called Single Client Access Name (SCAN).  This new feature created a lot of confusions to me, so I decided to do some research to under this new feature. 


I found following Oracle Support notes and other online sources explaining this new feature
1 11gR2 Grid Infrastructure Single Client Access Name (SCAN) Explained [ID 887522.1]
1.1 SCAN Concepts
1.2 Common Questions Regarding SCAN
          1.2.1 How can we configure the SCAN and SCAN listener?
          1.2.2 Do we still need to configure local listeners on each node?
          1.2.3 How does SCAN work ?
          1.2.4 Instead of DNS or GNS, Can we use '/etc/hosts' to resolve SCAN? 
          1.2.5 Can we use the previous method (Using VIP) for client connection?
          1.2.6 Is it mandatory to use SCAN? 
          1.2.7 Is it supported to remove SCAN? 
          1.2.8 Demo 
1.3 References
NOTE:1053147.1 - 11gR2 Clusterware and Grid Home - What You Need to Know
NOTE:887471.1 - PRVF-4664 PRVF-4657: Found inconsistent name resolution entries for SCAN name
NOTE:972500.1 - How to Modify SCAN Setting after Installation
NOTE:975457.1 - How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name
11.2 Scan and Node TNS Listener Setup Examples [ID 1070607.1]
        Real Application Clusters Admin and Deployment Guide
        Clusterware Administration and Deployment Guide
        Oracle Grid Infrastructure Installation Guide
        www.oracle.com/technetwork/database/clustering/overview/scan-129069.pdf


2 How to set up SCAN? How to check SCAN status? 
2.1 First of all, verify SCAN VIP and Listener setup
[oracle@racdbdb01 admin]$ $GRID_HOME/bin/cluvfy comp scan -verbose


Verifying scan


Checking Single Client Access Name (SCAN)...
  SCAN Name         Node          Running?      ListenerName  Port          Running?
  ----------------  ------------  ------------  ------------  ------------  ------------
  racdb-scan         racdbdb02      true          LISTENER_SCAN1  1521          true
  racdb-scan         racdbdb01      true          LISTENER_SCAN2  1521          true
  racdb-scan         racdbdb01      true          LISTENER_SCAN3  1521          true


Checking TCP connectivity to SCAN Listeners...
  Node          ListenerName              TCP connectivity?
  ------------  ------------------------  ------------------------
  localnode     LISTENER_SCAN1            yes
  localnode     LISTENER_SCAN2            yes
  localnode     LISTENER_SCAN3            yes
TCP connectivity to SCAN Listeners exists on all cluster nodes


Checking name resolution setup for "racdb-scan"...
  SCAN Name     IP Address                Status                    Comment
  ------------  ------------------------  ------------------------  ----------
  racdb-scan     192.168.100.174           passed
  racdb-scan     192.168.100.175           passed
  racdb-scan     192.168.100.176           passed


Verification of SCAN VIP and Listener setup passed


Verification of scan was successful.        


Note: in my environment, before the RAC installation, our SA had decided which IPs to be used for SCAN IPs, and set it up in DNS.  During RAC installation, it prompted for the SCAN name. 


2.2 check /etc/hosts file to see if IPs used by SCAN are set. 


2.3 check DNS setup for the scan address

[oracle@racdb01 admin]$ nslookup rac-scan
Server:         192.168.100.10
Address:        192.168.100.10#53


Name:   rac-scan.hostdb.com
Address: 192.168.100.174
Name:   rac-scan.hostdb.com
Address: 192.168.100.176
Name:   rac-scan.hostdb.com
Address: 192.168.100.175


2.4 Differences between SCAN Listener and Node Listener
-- Oracle recommends using 3 SCAN listeners for RAC.  If the RAC has 3 nodes, each node will have its own SCAN listener. If there is only 1 SCAN listener configured, then only 1 node would have the SCAN Listener running. 
-- Each node has its own listener, just like the regular listener in the single instance database.
-- Warning: make sure that both SCAN Listener and Node (Local) Listener are running from the $GRID_HOME, not the one from the $ORACLE_HOME



[oracle@racdb01 admin]$ ps -ef |grep tnslsnr
oracle   11778     1  0 Feb16 ?        00:00:55 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -inherit
oracle   11780     1  0 Feb16 ?        00:00:54 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit
oracle   11783     1  0 Feb16 ?        00:01:04 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
=======================================================
[oracle@node1 ~]$ ps -ef |grep tnslsnr
oracle   15702     1  0 Jan18 ?        00:14:55 /u01/11.2.0.2/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
oracle   16015     1  0 Jan18 ?        00:15:43 /u01/11.2.0.2/grid/bin/tnslsnr LISTENER -inherit
oracle   21481  1293  0 15:10 pts/0    00:00:00 grep tnslsnr



Note: 
1 racdb01 is part of 2 nodes cluster with 3 SCAN Listener configured, so 2 SCAN Listener are running from the same node.  racdb02 has only 1 SCAN listener running. 
2 node1 is part of 2 nodes cluster with only 1 SCAN Listener configured. 

2.5 LOCAL_LISTENER vs REMOTE_LISTENER
-- Database parameter LOCAL_LISTENER points to Node VIP address

SQL> show parameter local_listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=racdb01-vip)(PORT=1521))))

--Database Parameter REMOTE_LISTENER points to SCAN name

SQL> show parameter remote_listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string rac-scan.hostdb.com:1521

Note: please pay extra attention to these two listener settings.  In 10g, if these 2 are not set correctly, TAF would not work properly. 

2.6 listener.ora file
Warning: make sure it's the $GRID_HOME/network/admin/listener.ora being used by the database.
[oracle@racdb01 admin]$ cat $GRID_HOME/network/admin/listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3))))                # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2))))                # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent
ADMIN_RESTRICTION_LISTENER=ON
SQLNET.EXPIRE_TIME=10

=======================================================
[oracle@node1 ~]$ cat $GRID_HOME/grid/network/admin/listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent




Note: The ENABLE_GLOBAL_DYNAMIC_ENDPOINT_ parameter is set to allow the listener to accept connections for pre-11.2 databases which did not register the dynamic endpoint.


2.7 Listener status checking: 
Before check node listener and SCAN listener status, make sure set TNS_ADMIN=$GRID_HOME/network/admin
-- lsnrctl status listener
The above command would show 1 instance registered, which is the local instance running on the node where the above command is executed. 





[oracle@racdb01 admin]$ lsnrctl status listener


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:25:06


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


Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                16-FEB-2011 16:09:37
Uptime                    43 days 22 hr. 15 min. 29 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/racdb01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.172)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.250.10)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "rac" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
Service "rac_taf" has 1 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
The command completed successfully


=======================================================
[oracle@node1 ~]$ lsnrctl status listener


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-APR-2011 15:25:00


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1.hostdb.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                18-JAN-2011 16:54:26
Uptime                    72 days 21 hr. 30 min. 33 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/11.2.0.2/grid/network/admin/listener.ora
Listener Log File         /u02/oracle/diag/tnslsnr/node1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.130)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.211)(PORT=1521)))
Services Summary...
Service "netapp_taf.hostdb.com" has 1 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
Service "racflo.hostdb.com" has 1 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
Service "racfloXDB.hostdb.com" has 1 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
The command completed successfully


2.8 endpoints_listener.ora 
"New file for 11.2 called endpoints_listener.ora, showing the Node IP address and Node VIP address."


[grid@netrac1 admin]$ more endpoints_listener.ora
LISTENER_NETRAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=netrac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=12.345.678.888)(PORT=1521)(IP=FIRST)))) # line added by Agent




"Endpoints_listener.ora file is there for backward compatibility with pre-11.2 databases.
DBCA needs to know the endpoints location to configure database parameters and tnsnames.ora file.
It used to use the listener.ora file, 11.2 RAC listener.ora by default only has IPC entries."

2.9 Check SCAN Listener status
Warning: before check node listener and SCAN listener status, make sure set TNS_ADMIN=$GRID_HOME/network/admin


-- In my 1st set of cluster, only one SCAN listener configured, so in node1:

[oracle@node1 ~]$ lsnrctl status listener_scan1


LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-APR-2011 15:32:35


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                18-JAN-2011 16:53:06
Uptime                    72 days 21 hr. 39 min. 29 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/11.2.0.2/grid/network/admin/listener.ora
Listener Log File         /u01/11.2.0.2/grid/log/diag/tnslsnr/node1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.210)(PORT=1521)))
Services Summary...
Service "netapp_taf.hostdb.com" has 2 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
  Instance "racflo2", status READY, has 1 handler(s) for this service...
Service "racflo.hostdb.com" has 2 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
  Instance "racflo2", status READY, has 1 handler(s) for this service...
Service "racfloXDB.hostdb.com" has 2 instance(s).
  Instance "racflo1", status READY, has 1 handler(s) for this service...
  Instance "racflo2", status READY, has 1 handler(s) for this service...
The command completed successfully


======================
In node2, there is no SCAN listener running:

[oracle@node2 ~]$ ps -ef |grep tnslsnr
oracle   14517     1  0 Jan18 ?        00:14:05 /u01/11.2.0.2/grid/bin/tnslsnr LISTENER -inherit
oracle   15673 15301  0 15:36 pts/0    00:00:00 grep tnslsnr


============================================
In my 2nd set of 2 nodes cluster, 3 SCAN listener were configured, so in the 1st node:


[oracle@racdb01 ~]$ ps -ef |grep tnslsnr
oracle   11778     1  0 Feb16 ?        00:00:55 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -inherit
oracle   11780     1  0 Feb16 ?        00:00:54 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit
oracle   11783     1  0 Feb16 ?        00:01:05 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle   18197 30756  0 15:44 pts/0    00:00:00 grep tnslsnr
[oracle@racdb01 ~]$ export TNS_ADMIN=$GRID_HOME/network/admin
[oracle@racdb01 ~]$ lsnrctl status listener_scan1


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:44:51


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory
[oracle@racdb01 ~]$ lsnrctl status listener_scan2


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:44:53


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN2
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                16-FEB-2011 16:09:37
Uptime                    43 days 22 hr. 35 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/racdb01/listener_scan2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN2)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.174)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdb_taf" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@racdb01 ~]$ lsnrctl status listener_scan3


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:44:55


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN3
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                16-FEB-2011 16:09:37
Uptime                    43 days 22 hr. 35 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/racdb01/listener_scan3/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN3)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.175)(PORT=1521)))
Services Summary...
Service "racdb" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdb_taf" has 2 instance(s).
  Instance "racdb1", status READY, has 1 handler(s) for this service...
  Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@racdb01 ~]$




In the 2nd node:

[oracle@racdb02 ~]$ ps -ef |grep tnslsnr
oracle   12312 12101  0 15:47 pts/0    00:00:00 grep tnslsnr
oracle   13398     1  0 Feb16 ?        00:00:35 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle   13558     1  0 Feb16 ?        00:00:48 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
[oracle@racdb02 ~]$ lsnrctl status listener_scan1


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:48:10


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


TNS-01101: Could not find service name listener_scan1
[oracle@racdb02 ~]$ lsnrctl status listener_scan2


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:48:20


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


TNS-01101: Could not find service name listener_scan2
[oracle@racdb02 ~]$ export TNS_ADMIN=$GRID_HOME/network/admin
[oracle@racdb02 ~]$ lsnrctl status listener_scan1


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:48:26


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                16-FEB-2011 16:10:01
Uptime                    43 days 22 hr. 38 min. 25 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/racdb02/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.176)(PORT=1521)))
Services Summary...
Service "rac" has 2 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
  Instance "rac2", status READY, has 1 handler(s) for this service...
Service "rac_taf" has 2 instance(s).
  Instance "rac1", status READY, has 1 handler(s) for this service...
  Instance "rac2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@racdb02 ~]$ lsnrctl status listener_scan2


LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 01-APR-2011 15:48:31


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory


2.10 Further information on the listeners can be found via svrctl.
Configuration changes to the Listener are made via svrctl.



[oracle@racdb02 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[oracle@racdb02 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.100.0/255.255.255.0/bondeth0
SCAN VIP name: scan1, IP: /rac-scan.hostdb.com/192.168.100.176
SCAN VIP name: scan2, IP: /rac-scan.hostdb.com/192.168.100.174
SCAN VIP name: scan3, IP: /rac-scan.hostdb.com/192.168.100.175




[oracle@node1 ~]$  srvctl config scan
SCAN name: rac-cluster.hostdb.com, Network: 1/192.168.100.0/255.255.255.0/bond0
SCAN VIP name: scan1, IP: /rac-cluster.hostdb.com/192.168.100.210
[oracle@node1 ~]$  srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 


3 References

  1. How To Configure Server Side Transparent Application Failover [ID 460982.1]
  2. Note 952903.1 How to update the IP address of the SCAN VIP resources (ora.scan.vip)
  3. Note 975457.1 How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name
  4. Note 972500.1 How to Modify SCAN Setting after Installation
  5. NOTE:948456.1 - Pre 11.2 Database Issues in 11gR2 Grid Infrastructure Environment
  6. How to Access a RAC Database configured with SCAN via Java Thin Driver [ID 1081179.1]
  7. How to Setup SCAN Listener and Client for TAF and Load Balancing [Video] [ID 1188736.1]
  8. ORA-12545 or ORA-12537 Reported while Connecting to RAC through SCAN name [ID 970619.1]

Labels: , ,