SERVER CONTROL UTILITY (SRVCTL)

Server Control Utility (SRVCTL): It is used to administer Oracle Real Application Clusters (Oracle RAC) databases and instances.

Use SRVCTL to manage Oracle supplied resources such as:

  • Database
  • Listener
  • Instances
  • Disk groups
  • Networks

If resource name begins with ora then use SRVCTL. Oracle suggest DBAs to use srvctl command to stop/start the databases.

We can use the SRVCTL to manage configuration information.  Use SRVCTL commands to add, remove, start, stop, modify, enable, and disable a number of entities, such as Databases, instances, listeners, SCAN listeners, services, grid naming Service (GNS), and Oracle ASM.

CLUSTERWARE CONTROL UTILITY (CRSCTL)

Clusterware Control Utility (CRSCTL): It is used to managed oracle clusterware resources and components.

Use CRSCTL for managing Oracle Clusterware and its resources. CRSCTL command is used to manage the elements of the clusterware like crs, css, evm.

CRSCTL manages Oracle Clusterware related operations like:

  • Starting and stopping Oracle Clusterware
  • Enabling and disabling Oracle Clusterware daemons
  • Checking the health of the cluster
  • Registering cluster resources

 

SERVER CONTROL UTILITY (SRVCTL) – DATABASE RELATED COMMANDS

srvctl -help >>> List All Commands With Syntax

srvctl status listener -n node1 >>> Check Listener Status Of Specific Node
srvctl status listener >>> Check Listener Status Of All Nodes

srvctl start listener -n node1 >>> Start Listener On Specific Node
srvctl start listener >>> Start Listener On All Nodes

srvctl stop listener -n node1 >>> Stop Listener On Specific Node
srvctl stop listener >>> Stop Listener On All Nodes

srvctl status instance -d CDBTEST -i CDBTEST1 >>> Check Status Of Specific Instance
srvctl status database -d CDBTEST >>> Check Status Of All Instances

srvctl start instance -d CDBTEST -i CDBTEST1 >>> Starts Specific Instance
srvctl start database -d CDBTEST >>> Starts All Instances (+Open Database)

srvctl start database -d CDBTEST -o nomount >>> Starts Service As Nomount
srvctl start database -d CDBTEST -o mount >>> Starts Service As Mount
srvctl start database -d CDBTEST -o open >>> Starts Service As Open

srvctl stop instance -d CDBTEST -i CDBTEST1 >>> Stops Specific Instance
srvctl stop database -d CDBTEST >>> Stops All Instances (+Shutdown Database)

srvctl stop database -d CDBTEST -o normal >>> Stops Service As Normal
srvctl stop database -d CDBTEST -o immediate >>> Stops Service As Immediate
srvctl stop database -d CDBTEST -o transactional >>> Stops Service As Transactional
srvctl stop database -d CDBTEST -o abort >>> Stops Service As Abort

srvctl config database >>> Check Registered Databases In The Repository
srvctl config database -d CDBTEST >>> Check Specific Database Configuration

CLUSTERWARE CONTROL UTILITY (CRSCTL) – CLUSTER RELATED COMMANDS

crsctl config has >>> Check Oracle HAS (High Availabilty Services) Config
crsctl disable has >>> Disable Automatic Startup Of The Oracle High Availability Services
crsctl enable has >>> Enable Automatic Startup Of The Oracle High Availability Services

crsctl check crs >>> Check Oracle High Availability Services On The Local Server.
crsctl stop crs >>> Stop Oracle High Availability Services On The Local Server.
crsctl start crs >>> Start Oracle High Availability Services On The Local Server.

crsctl query crs softwareversion >>> Check Oracle Clusterware Software Version
crsctl query crs activeversion >>> Check Oracle Clusterware Acitve Version
crsctl query crs releaseversion >>> Check Oracle Clusterware Release Version

 

SHUTDOWN SEQUENCE OF ONLY ONE NODE IN A CLUSTER:

Check Database And ASM Instance
[root@node1 ~]# ps -ef | grep pmon | grep -v grep
grid 9501 1 0 May24 ? 00:00:04 asm_pmon_+ASM1
oracle 14761 1 0 08:54 ? 00:00:00 ora_pmon_CDBTEST1
[root@node1 ~]#

Check And Stop Instance
[root@node1 ~]# srvctl status instance -d CDBTEST -i CDBTEST1
[root@node1 ~]# srvctl stop instance -d CDBTEST -i CDBTEST1
[root@node1 ~]# srvctl status instance -d CDBTEST -i CDBTEST1

Check And Stop Oracle High Availability Services On The Local Server
[root@node1 ~]# crsctl check crs
[root@node1 ~]# crsctl stop crs
[root@node1 ~]# crsctl check crs

Check Database And ASM Instance
[root@node1 ~]# ps -ef | grep pmon | grep -v grep
[root@node1 ~]#

 

STARTUP SEQUENCE OF ONLY ONE NODE IN A CLUSTER:

Check And Scan ASM Discs
[root@node1 ~]# ll /dev/oracleasm/disks/
[root@node1 ~]# oracleasm scandisks
[root@node1 ~]# ll /dev/oracleasm/disks/

Check And Start Oracle High Availability Services On The Local Server
[root@node1 ~]# crsctl check crs
[root@node1 ~]# crsctl start crs
[root@node1 ~]# crsctl check crs

Check And Start Instance
[root@node1 ~]# srvctl status instance -d CDBTEST -i CDBTEST1
[root@node1 ~]# srvctl start instance -d CDBTEST -i CDBTEST1
[root@node1 ~]# srvctl status instance -d CDBTEST -i CDBTEST1

Check Database And ASM Instance
[root@node1 ~]# ps -ef | grep pmon | grep -v grep
grid 9501 1 0 May24 ? 00:00:04 asm_pmon_+ASM1
oracle 14761 1 0 08:54 ? 00:00:00 ora_pmon_CDBTEST1
[root@node1 ~]#

Recommended Posts

Start typing and press Enter to search