Thursday, September 26, 2013

How to Configure Oracle RAC Listeners

Information about How To Configure Oracle RAC Listeners
This document will explain how to Configure Oracle RAC Listeners on any node.

Document Creator
Todd Walters 

Requirements
  • Oracle RAC is installed on csrv0dbx01, csrv0dbx02, and csrv0dbx03
  • The name of the database is psitedb
  • Each Instance is called psitedbX where X is the node, i.e. psitedb1
  • lsnrctl is used to view listener status and perform admin commands.
  • srvctl is used to control all nodes. srvctl -h will show you syntax help
  • showcrs script stored in oracle home directory will show status of all nodes.
  • If srvctl does not stop and start instance properly verify TNS_ADMIN env is set. See Setting TNS_ADMIN Below
  • TIP: Run export SRVM_TRACE=TRUE
    Then try and start instance:$ srvctl start instance -d psitedb -I psitedb3
    This will then let you see the log file as it starts and check for errors.
  • netmgr may also be used to view listeners
How To Set TNS_ADMIN
  • source +ASMx (ASM1 for node 1)
  • Use the command (for each node): srvctl setenv nodeapps -n node -T TNS_ADMIN=$ORACLE_HOME/network/admin/
How to Configure Oracle RAC Listener
  1. Login to Oracle Server. You must you use VNC because you'll need the gui.
  2. su - oracle
  3. Source ASM
    • > . oraenv
      ORACLE_SID = [ORA1020] ? +ASM1
      csrv0dbx01 | +ASM1 | /export/home/oracle
      > cd $ORACLE_HOME
      csrv0dbx01 | +ASM1 | /u00/app/oracle/product/10.2.0/ASM
  4. run netca to launch gui and create listener.
  5. The procedure I found to get things working properly was to source +ASM1 via . oraenv > cd $ORACLE_HOME, which will place you in the /u00/app/oracle/product/10.2.0/ASM/network/admin directory. Then run netca > remove the listeners . Run netca again to create the listener and this time the listener.ora file will be created with the proper ORACLE_HOME:
SID_LIST_LISTENER_CSRV0DBX01 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u00/app/oracle/product/10.2.0/ASM)(PROGRAM = extproc)
If you run lsnrctl status as well you will see that the 'Listener Parameter File' is now pointing to the right location:
Listener Parameter File /u00/app/oracle/product/10.2.0/ASM/network/admin/listener.ora

Example:

> lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 19-FEB-2009 11:28:11
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_CSRV0DBX01
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                19-FEB-2009 10:27:19
Uptime                    0 days 1 hr. 0 min. 52 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /u00/app/oracle/product/10.2.0/ASM/network/admin/listener.ora
Listener Log File         /u00/app/oracle/product/10.2.0/ASM/network/log/listener_csrv0dbx01.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.67.2.79)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.67.2.76)(PORT=1521)))

Reference:


No comments:

Post a Comment