Thursday, July 17, 2014

Oracle RAC



Stopping and Starting the RAC cluster

Note : "/u01/app/11.2.0/grid/bin/" is my Grid_Home, I'm executing like following since I have not set the PATH variable, do the necessary modification and execute the following commands.

Starting the RAC Cluster

Method 01

# /u01/app/11.2.0/grid/bin/crsctl start cluster -all

Mathod 02

You will have to execute this on both nodes. The has or High Availability service will start all the cluster services.

# /u01/app/11.2.0/grid/bin/crsctl start has

Stopping the RAC Cluster

Method 01 

# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all

Method 02

# /u01/app/11.2.0/grid/bin/crsctl stop has


Monitoring the RAC Cluster and DB

General Commands to Monitor the Cluster


# /u01/app/11.2.0/grid/bin/srvctl status nodeapps

# /u01/app/11.2.0/grid/bin/crsctl check crs

# /u01/app/11.2.0/grid/bin/cluvfy comp ocr -n all -verbose

# /u01/app/11.2.0/grid/bin/crs_stat -t -v

# /u01/app/11.2.0/grid/bin/crsctl check cluster -all

# /u01/app/11.2.0/grid/bin/crsctl stat res -t


Check the Status of the Listeners


# /u01/app/11.2.0/grid/bin/srvctl status listener

# /u01/app/11.2.0/grid/bin/srvctl config listener

Detailed options

# /u01/app/11.2.0/grid/bin/lsnrctl status LISTENER

# /u01/app/11.2.0/grid/bin/crsctl status res ora.LISTENER_SCAN1.lsnr

How to start a listener if not listening already

# /u01/app/11.2.0/grid/bin/srvctl start listener -n rac2 -l LISTENER

Checking the DB

Checking whether DB process are running

# ps -ef | grep smon

To set DB related variables when starting the DB

# . ora env

DB information

# /u01/app/11.2.0/grid/bin/srvctl config database -d RAC

# /u01/app/11.2.0/grid/bin/srvctl status database -d RAC



Starting the EM console

Check status 

# /u01/app/oracle/product/11.2.0/db_1/bin/emctl status dbconsole

Start Console

# /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole


Accessing the DB

# sqlplus SYS as sysdba
# ./sqlplus sys/wso2root@scan.private.wso2.com:1521/rac
# ./sqlplus sys/w@192.168.18.116:1521/rac

After Loging in

select instance_name from gv$instance;
select name from V$dalabase;



There are many more commands and options, these are some commands that may come in handy.

Categories: ,

0 comments:

Post a Comment

Subscribe to RSS Feed Follow me on Twitter!