Useful command for Clusterware on Oracle RAC Environment

Useful commands for Manage Oracle RAC Environment

Check Cluster Status

crsctl check cluster -all

NODE1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization is online
CRS-4533: Event Manager is online
NODE2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization is online
CRS-4533: Event Manager is online

Check cluster resources

crsctl status resource -t

Check version of cluster ware

[root@rac1 bin]# ./crsctl query crs softwareversion rac1
CRS software version on node [rac1] is [10.2.0.1.0]

Find Cluster home name

[oracle@rac1 bin]$ ./cemutlo -n
crs

Check the status of cluster ware services.

[root@rac1 bin]# ./crs_stat -t
<pre
Name         Type        Target State  Host      
------------ ----------- ------ ------ ----
ora.rac1.gsd application ONLINE ONLINE rac1      
ora.rac1.ons application ONLINE ONLINE rac1      
ora.rac1.vip application ONLINE ONLINE rac1      
ora.rac2.gsd application ONLINE ONLINE rac2      
ora.rac2.ons application ONLINE ONLINE rac2      
ora.rac2.vip application ONLINE ONLINE rac2    


Stop all the service of cluster

[root@rac1 bin]# ./crs_stop -all

Attempting to stop `ora.rac1.gsd` on member `rac1`
Attempting to stop `ora.rac2.gsd` on member `rac2`
Attempting to stop `ora.rac1.ons` on member `rac1`
Stop of `ora.rac2.gsd` on member `rac2` succeeded.
Attempting to stop `ora.rac2.ons` on member `rac2`
Stop of `ora.rac1.gsd` on member `rac1` succeeded.
Stop of `ora.rac1.ons` on member `rac1` succeeded.
Stop of `ora.rac2.ons` on member `rac2` succeeded.
Attempting to stop `ora.rac1.vip` on member `rac1`
Attempting to stop `ora.rac2.vip` on member `rac2`
Stop of `ora.rac1.vip` on member `rac1` succeeded.
Stop of `ora.rac2.vip` on member `rac2` succeeded.

Check the status of cluster

[root@rac1 bin]# ./crs_stat -t

Name           Type           Target    State     Host      
------------------------------------------------------------
ora.rac1.gsd   application    OFFLINE   OFFLINE            
ora.rac1.ons   application    OFFLINE   OFFLINE            
ora.rac1.vip   application    OFFLINE   OFFLINE            
ora.rac2.gsd   application    OFFLINE   OFFLINE            
ora.rac2.ons   application    OFFLINE   OFFLINE            
ora.rac2.vip   application    OFFLINE   OFFLINE    

Start the cluster services

[root@rac1 bin]# ./crs_start -all

Attempting to start `ora.rac1.vip` on member `rac1`
Attempting to start `ora.rac2.vip` on member `rac2`
Start of `ora.rac2.vip` on member `rac2` succeeded.
Start of `ora.rac1.vip` on member `rac1` succeeded.
Attempting to start `ora.rac1.gsd` on member `rac1`
Attempting to start `ora.rac1.ons` on member `rac1`
Attempting to start `ora.rac2.ons` on member `rac2`
Attempting to start `ora.rac2.gsd` on member `rac2`
Start of `ora.rac1.gsd` on member `rac1` succeeded.
Start of `ora.rac2.gsd` on member `rac2` succeeded.
Start of `ora.rac2.ons` on member `rac2` succeeded.
Start of `ora.rac1.ons` on member `rac1` succeeded.

Check the status of crs

 ./crsctl check crs

CSS appears healthy
CRS appears healthy
EVM appears healthy

Check the location of OCR disk

[root@rac1 bin]#  ./ocrcheck

Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :    9775400
         Used space (kbytes)      :       1984
         Available space (kbytes) :    9773416
         ID                       :  861912775
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded

Check the status of votedisk

[root@rac1 bin]#  ./crsctl query css votedisk
 0.     0    /dev/raw/raw2
located 1 votedisk(s).

Start the crs if nor running

$CRS_HOME/bin/crsctl start crs

Check the status of crs

$CRS_HOME/bin/crsctl status crs

/etc/initab configured having entries to start crs:

h1:3:respawn:/sbin/init.d/init.evmd run >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1 </dev/null

To stop or start crs

# $ORA_CRS_HOME/bin/crsctl stop crs
# $ORA_CRS_HOME/bin/crsctl start crs

Check the number of nodes in RAC

$ORA_CRS_HOME/bin/olsnodes -p

Start the crs resource in RAC

./crsctl start resources

Check the thread is present in RAC

select thread#,status,enabled,instance from v$thread;

THREAD# STATUS ENABLED INSTANCE
------- ------ ------- --------
      1 OPEN   PUBLIC  ORCL_1
      2 OPEN   PUBLIC  ORCL_2


Check the Redo log file present in RAC with Thread

select GROUP#,THREAD#,MEMBERS,STATUS,BYTES from v$log;

 
GROUP# THREAD# MEMBERS STATUS   BYTES
------ ------- ------- -------- ----------
1       1      1       INACTIVE 5000000
2       1      1       CURRENT	5000000
3       2      1       CURRENT  5000000
4       2      1       INACTIVE 5000000

Adding logfile for new instance ORCL_3.

alter database add logfile instance 'ORCL_3' group 5 size 5000000;
alter database add logfile instance 'ORCL_3' group 6 size 5000000;

For enable the thread three for redo logs

alter database enable public thread 3;

Enabled now:
select thread#,status,enabled,instance from v$thread;

THREAD# STATUS ENABLED  INSTANCE
------- ------ -------- --------
1       OPEN   PUBLIC   ORCL_1
2       OPEN   PUBLIC   ORCL_2
3       CLOSED PUBLIC	ORCL_3

Note: Closed means instance is not started yet.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.