Sunday, January 31, 2016

RAC 11g Useful Commands

STOP SEQUENCE

COMMAND                                   DESCRIPTION

------------------------------------------------------------------------------------------
srvctl stop database -d ORCL              STOP DATABASE 
srvctl stop instance -d ORCL -i ORCL1     STOP first INSTANCE (skip it if running 'stop database' as that will stop both instances)
srvctl stop instance -d ORCL -i ORCL2     STOP second INSTANCE (skip it if running 'stop database' as that will stop both instances)
srvctl stop asm -n NODE1                  STOP ASM INSTANCES on NODE 1 (In 11G , we have OCR on ASM so we cannot stop ASM, but if you have OCR in NON-ASM you should stop it)
srvctl stop asm -n NODE2                  STOP ASM INSTANCES on NODE 2 (In 11G , we have OCR on ASM so we cannot stop ASM, but if you have OCR in NON-ASM you should stop it)
srvctl stop nodeapps -n NODE1             STOP NODEAPPS  on NODE 1
srvctl stop nodeapps -n NODE2             STOP NODEAPPS  on NODE 2
/etc/init.d/init.crs stop                 STOP CRS PROCESSES (AS ROOT USER)

START SEQUENCE

COMMAND                                      DESCRIPTION
-------------------------------------------------------------------------------------------
/etc/init.d/init.crs start                   START CRS PROCESS (AS ROOT USER)
srvctl start asm -n NODE1                    START ASM INSTANCE on node 1
srvctl start asm -n NODE2                    START ASM INSTANCE on node 2
srvctl start database -d ORCL                START DATABASE
srvctl start instance -d ORCL -i ORCL1       START first INSTANCE (skip it if running 'start database' as that will start both instances)
srvctl start instance -d ORCL -i ORCL2       START second INSTANCE (skip it if running 'start database', as taht will start both instances)
srvctl start nodeapps -n NODE1               START NODEAPPS on NODE1
srvctl start nodeapps -n NODE2               START NODEAPPS ON NODE2


OTHER USEFUL COMMANDS


COMMAND                                      DESCRIPTION
---------------------------------------------------------------------
crsctl status resource -t                    Clusterware Resource Status Check
srvctl status database -d ORCL               STATUS OF DATABASE
srvctl stop listener -l LISTENER_NAME        STOP A LISTENER
srvctl start listener -l LISTENER_NAME       START A LISTENER
crsctl stop has                              stop all the clusterware services/ resources on specific node (including DB and listener) (run as root)
crsctl start has                             start all the clusterware services/ resources on specific node (including DB and listener) (run as root)
crsctl stop cluster -all                     to stop csr services on all nodes of clusterware (run as root)
crsctl start cluster -all                    to start crs services on all nodes of clusterware (run as root)
crsctl check has                             to check if ohasd is running/ stopped (run as root)
crsctl enable has                            enable Oracle High Availability Services autostart (run as root)
crsctl disable has                           disable Oracle High Availability Services autostart (run as root)
crsctl config has                            check if Oracle High Availability Services autostart is enabled/ disabled (run as root)
srvctl status nodeapps                       to check the status of services on all nodes
crsctl stop crs                              stop all the clusterware services/ resources ON THAT NODE! (run as root)
crsctl start crs                             start all the clusterware services/ resources ON THAT NODE! (run as root)
cluvfy comp scan -verbose                    Verifying scan status scan_listener                         
srvctl config scan_listener                  Verifying scan port
srvctl relocate scan -i 1 -n NODE1           Relocate scan listener 1 to the mentioned node

No comments:

Post a Comment