Navneet_Oracledba
SRVCTL AND
CRSCTL
Commands In RAC Database
SRVCTL
srvctl is a utility in an oracle grid infrastructure software
by which we can start and stop database, listener, instance,
ASM.
we can start and stop database through the instance level.
1. To check the status of RAC database
srvctl status database -d prim (note: prim is a database
2. To stop the Rac database which is my db name)
srvctl stop database -d prim (prim1 is my instance name)
3. To start the RAC database (node1 is my server name)
srvctl start database -d prim
4. To start a single instance in RAC database
srvctl start instance -i prim1 -d prim
5. To stop a single instance in RAC database
srvctl stop instance -i prim1 -d prim
6. To check the status of listener in RAC database
• srvctl status listener -l LISTENER
• ps -ef|grep tns
7. To stop the listener in oracle database
srvctl stop listener -l LISTENER
8. To start the listener in oracle database
srvctl start listener -l LISTENER
9. To mount database in RAC environment
Shutdown the database- srvctl stop database -d prim
srvctl start database -d prim -o mount
10 To nomount the database in RAC environment
Shutdown the database- srvctl stop database -d prim
srvctl start database -d prim -o nomount
11.To nomount the database in RAC environment
Shutdown the database- srvctl stop database -d prim
srvctl start database -d prim -o open
SRVCTL command for ASM
1. To configure the ASM
srvctl config asm -a
2. To enable/disable ASM
srvctl enable asm -n node1
srvctl disable asm -n node1
3. To check the status of the ASM
srvctl status asm -n node1 -a
4. To start/stop the ASM
srvctl start asm -n node1
srvctl stop asm -n node1 -f
5. To modify the ASM Parameters
srvctl modify asm [-n node_name] [-l listener_name] [-d
asm_diskstring] [-p spfile_path]
6. To add/remove the ASM
srvctl add asm [-l lsnr_name] [-p spfile] [-d
asm_diskstring]
srvctl remove asm -l [-f]
CRSCTL
crsctl is the Oracle Clusterware Control utility used to manage Oracle Clusterware,
allowing you to perform operations like checking, starting, and stopping cluster
resources and daemons, and managing cluster health.
When we run the command crstcl start cluster -all, database,
ASM,listener scan,VIP,services in all the nodes.
1. To close all the services in a node
We need to run the command using root user but we need to
set the .bash_profile in root user and source it.
crsctl stop crs -f
2. To start all the services in a node in RAC database
we need to run the command using root user
crsctl start crs -nowait
3. Checks the status of the Cluster Synchronization
Services (CSS).
crsctl check crs
4. Starts the Oracle Clusterware
crsctl start crs
5. Stop the Oracle Clusterware
crsctl stop crs
6. Displays the status of resources registered in the
cluster
crsctl status resource
7. Removes resources from the Oracle Clusterware
configuration.
crsctl delete resource