RAC Commands
RAC Commands
===========
Addition :
srvctl add database -d <dbname> -o <homepath>
add instance -d <dbname> -i <instance_name> -n <node>
add service
Configuration :
srvctl config database -d <dbname> -n <node> -a (optional)
config service
config asm
config listener
Enable / Disable
srvctl disable/enable database -d <dbname>
instance -d <dbname> -i <instance>
service -d <dbname> -s <service> -i <instance>
asm -n <nodename> -i <instance>
start/stop
>ocrcheck
OCR Backup :
ocrconfig -export <filename>
OCR restore :
crsctl stop crs
ocrconfig restore <backup filename>
crsctl start crs
OCR Multiplex :
crsctl query css votedisk
crsctl add css votedisk /dev/raw/raw12 (multiplex location) --force
Services :
>Internal services
select service from v$session;
sys$background
sys$users
>Application Services:
active /spare : one node active other servs as fail over
active symmetric : all node active any one fails others will take over
the load based on laod
active asummetric : all node have the service, but only one will be in active
others will work as a fail over
From the node you are deleting from the cluster (linux3), run the
script $ORA_CRS_HOME/install/rootdelete.sh to disable
the Oracle Clusterware applications that are on the node. This script
should only be run once. Given the Clusterware software install is on
local disk (non-shared), make certain to use the nosharedhome
argument. The default for this script is sharedhome which prevents
you from updating the permissions of local files such that they can be
removed by the oracle user account.
Running this script will stop the CRS stack and delete the ocr.loc
file on the node to be removed. The nosharedvar option assumes
the ocr.loc file is not on a shared file sytem.
While logged into linux3 as the root user account, run the
following:
$ su
# cd $ORA_CRS_HOME/install
# ./rootdelete.sh local nosharedvar nosharedhome
CRS-0210: Could not find resource 'ora.linux3.LISTENER_LINUX3.lsnr'.
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
Checking to see if Oracle CRS stack is down...
Oracle CRS stack is not running.
Oracle CRS stack is down now.
Removing script for Oracle Cluster Ready services
Updating ocr file for downgrade
Cleaning up SCR settings in '/etc/oracle/scls_scr'
$ $ORA_CRS_HOME/bin/olsnodes -n
linux1 1
linux2 2
linux3 3
While logged into linux1 as the root user account, run the
following using the name linux3 and the node number 3:
$ su
# cd $ORA_CRS_HOME/install
# ./rootdeletenode.sh linux3,3
CRS-0210: Could not find resource 'ora.linux3.LISTENER_LINUX3.lsnr'.
CRS-0210: Could not find resource 'ora.linux3.ons'.
CRS-0210: Could not find resource 'ora.linux3.vip'.
CRS-0210: Could not find resource 'ora.linux3.gsd'.
CRS-0210: Could not find resource ora.linux3.vip.
CRS nodeapps are deleted successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 14 values from OCR.
Key SYSTEM.css.interfaces.nodelinux3 marked for deletion is not there. Ignoring.
Successfully deleted 5 keys from OCR.
Node deletion operation successful.
'linux3,3' deleted successfully
To verify that the node was successfully removed, use the following
as either the oracle or root user:
$ $ORA_CRS_HOME/bin/olsnodes -n
linux1 1
linux2 2
From the node to be deleted (linux3), run the OUI as the oracle
user account to update the inventory node list for the Oracle
Clusterware software:
$ cd $ORA_CRS_HOME/oui/bin
$ ./runInstaller -updateNodeList ORACLE_HOME=$ORA_CRS_HOME
CLUSTER_NODES="" -local CRS=true
Starting Oracle Universal Installer...
$ cd $ORA_CRS_HOME/oui/bin
$ ./runInstaller
$ cd $ORA_CRS_HOME/oui/bin
$ ./runInstaller -updateNodeList ORACLE_HOME=$ORA_CRS_HOME
"CLUSTER_NODES={linux1,linux2}" CRS=true
Starting Oracle Universal Installer...
You should not see any output from the above command
$ $ORA_CRS_HOME/bin/olsnodes -n
linux1 1
linux2 2
You should see the present node list without the deleted node (that is
linux1 and linux2 only).
# mv -f /etc/inittab.no_crs /etc/inittab
# rm -f /etc/inittab.orig
# rm -f /etc/inittab.crs
# rm -rf /etc/oracle
# rm -f /etc/oratab
# rm -f /etc/oraInst.loc
# rm -rf /etc/ORCLcluster
# rm -rf /u01/app/oracle
# rm -rf /u01/app/crs
# rm -f /usr/local/bin/coraenv
# rm -f /usr/local/bin/dbhome
# rm -f /usr/local/bin/oraenv
Finally, remove the Oracle user account and all associated UNIX
groups from linux3:
# userdel -r oracle
# groupdel oinstall
# groupdel dba