Mastering Oracle RAC: Check Status, Configure, and Manage Instances with SRVCTL
This guide explains how to use SRVCTL to view the status of Oracle RAC databases, instances, services, node applications, and ASM instances, retrieve configuration details, start and stop the cluster, and perform backup and restore operations with concrete command examples.
Checking RAC Status
Use srvctl status to display the current state of the whole RAC database, individual instances, services, node applications, and ASM instances.
$ srvctl status database -d orcl
Instance orcl1 is running on node linux1
Instance orcl2 is running on node linux2 $ srvctl status instance -d orcl -i orcl2
Instance orcl2 is running on node linux2 $ srvctl status service -d orcl -s orcltest
Service orcltest is running on instance(s) orcl2, orcl1 $ srvctl status nodeapps -n linux1
VIP is running on node: linux1
GSD is running on node: linux1
Listener is running on node: linux1
ONS daemon is running on node: linux1 $ srvctl status asm -n linux1
ASM instance +ASM1 is running on node linux1.Retrieving Configuration Information
List all configured databases, display RAC database configuration, show services, and view node‑application settings.
$ srvctl config database
orcl $ srvctl config database -d orcl
linux1 orcl1 /u01/app/oracle/product/10.2.0/db_1
linux2 orcl2 /u01/app/oracle/product/10.2.0/db_1 $ srvctl config service -d orcl
orcltest PREF: orcl2 orcl1 AVAIL: $ srvctl config nodeapps -n linux1 -a -g -s -l
VIP exists.: /linux1-vip/192.168.1.200/255.255.255.0/eth0:eth1
GSD exists.
ONS daemon exists.
Listener exists. $ srvctl config asm -n linux1
+ASM1 /u01/app/oracle/product/10.2.0/db_1Listing Running Instances
SELECT inst_id, instance_number inst_no, instance_name inst_name, parallel, status,
database_status db_status, active_state state, host_name host
FROM gv$instance
ORDER BY inst_id;Result example:
INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST
1 1 orcl1 YES OPEN ACTIVE NORMAL rac1
2 2 orcl2 YES OPEN ACTIVE NORMAL rac2Data‑File and ASM Disk Queries
Combine several dictionary views to list every data file, log file, control file, and temporary file belonging to the database.
SELECT name FROM v$logfile
UNION
SELECT member FROM v$logfile
UNION
SELECT name FROM v$controlfile
UNION
SELECT name FROM v$tempfile;Sample output shows paths such as +FLASH_RECOVERY_AREA/orcl/controlfile/current.258.570913191 and +ORCL_DATA1/orcl/datafile/system.262.570913215.
To list all ASM disks that belong to a specific disk group (e.g., ORCL_DATA1), run:
SELECT path FROM v$asm_disk
WHERE group_number IN (SELECT group_number FROM v$asm_diskgroup WHERE name = 'ORCL_DATA1');Typical result:
ORCL:VOL1
ORCL:VOL2Starting and Stopping the RAC Cluster
All commands must be executed as the oracle UNIX user on a chosen node (e.g., rac1).
Stop the cluster
# su - oracle
$ export ORACLE_SID=orcl1
$ emctl stop dbconsole
$ srvctl stop instance -d orcl -i orcl1
$ srvctl stop asm -n rac1
$ srvctl stop nodeapps -n rac1Start the cluster
$ export ORACLE_SID=orcl1
$ srvctl start nodeapps -n rac1
$ srvctl start asm -n rac1
$ srvctl start instance -d orcl -i orcl1
$ emctl start dbconsoleFor convenience you can start or stop every instance and its services with a single command:
$ srvctl start database -d orcl
$srvctl stop database -d orclListener Management
hostb$ lsnrctl start listener_hostb
hostb$ lsnrctl stop listener_hostbOCR Backup and Restore
Backup the OCR (Oracle Cluster Registry) using dd or the built‑in ocrconfig -export command, then restore with ocrconfig -import. Example:
# dd if=/dev/rdsk/c4t600C0FF000000000098ADE240330A000d0s4 of=/data/backup/rac/vd_backup0420.bak
# /data/oracle/crs/bin/ocrconfig -export /data/oracle/crs/backup/ocrdisk.bakCheck OCR status with: $ ocrcheck Typical output shows version, total space, used space, and available space.
Additional Queries
List all data files in the database:
SELECT name FROM v$datafile
UNION SELECT member FROM v$logfile
UNION SELECT name FROM v$controlfile
UNION SELECT name FROM v$tempfile;These commands provide a complete picture of the RAC environment, allowing administrators to monitor, configure, and maintain Oracle RAC clusters efficiently.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
