How to Check and Manage Oracle RAC Instances and Services with SRVCTL
This guide shows how to use SRVCTL commands and SQL queries to view the status of Oracle RAC databases, instances, services, node applications, ASM instances, and disk groups, as well as how to start and stop the entire RAC cluster safely.
All Instances and Services Status
$ srvctl status database -d orclInstance orcl1 is running on node linux1
Instance orcl2 is running on node linux2
Single Instance Status
$ srvctl status instance -d orcl -i orcl2Instance orcl2 is running on node linux2
Database Global Services Status
$ srvctl status service -d orcl -s orcltestService orcltest is running on instance(s) orcl2, orcl1
Node Application Status (VIP, GSD, ONS, Listener)
$ srvctl status nodeapps -n linux1VIP is running on node: linux1
GSD is running on node: linux1
Listener is running on node: linux1
ONS daemon is running on node: linux1
ASM Instance Status
$ srvctl status asm -n linux1ASM instance +ASM1 is running on node linux1.
List Configured Databases
$ srvctl config databaseorcl
Show RAC Database Configuration
$ srvctl config database -d orcllinux1 orcl1 /u01/app/oracle/product/10.2.0/db_1
linux2 orcl2 /u01/app/oracle/product/10.2.0/db_1
Show All Services for a Cluster Database
$ srvctl config service -d orclorcltest PREF: orcl2 orcl1 AVAIL:
Show Node Application Configuration (VIP, GSD, ONS, Listener)
$ srvctl config nodeapps -n linux1 -a -g -s -lVIP exists.: /linux1-vip/192.168.1.200/255.255.255.0/eth0:eth1
GSD exists.
ONS daemon exists.
Listener exists.
Show ASM Instance Configuration
$ srvctl config asm -n linux1+ASM1 /u01/app/oracle/product/10.2.0/db_1
Running Instances in the Cluster
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 rac2All Data Files in a Disk Group
SELECT name FROM v$datafile
UNION SELECT member FROM v$logfile
UNION SELECT name FROM v$controlfile
UNION SELECT name FROM v$tempfile;Sample output includes control files, online redo logs, data files, and temp files located in the specified ASM disk groups.
All ASM Disks in a Specific Disk Group (e.g., ORCL_DATA1)
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:VOL2
Starting and Stopping the RAC Cluster (Oracle 10g)
Stop Procedure
1. Stop Oracle instances and services.
2. Stop ASM instance.
3. Stop node applications (VIP, GSD, Listener, ONS).
# 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 Procedure
1. Start node applications.
2. Start ASM instance.
3. Start Oracle instance and related services.
# su - oracle
$ export ORACLE_SID=orcl1
$ srvctl start nodeapps -n rac1
$ srvctl start asm -n rac1
$ srvctl start instance -d orcl -i orcl1
$ emctl start dbconsoleStart/Stop All Instances and Services
$ srvctl start database -d orcl
$ srvctl stop database -d orclListener Control
hostb$ lsnrctl start listener_hostb
hostb$ lsnrctl stop listener_hostbOCR (Oracle Cluster Registry) Backup and Restore
Backup OCR:
/data/oracle/crs/bin/ocrconfig -export /data/backup/rac/ocrdisk.bakRestore OCR (requires stopping the cluster first):
/data/oracle/crs/bin/ocrconfig -import file_nameCheck OCR status: /data/oracle/crs/bin/ocrcheck Typical OCR check output shows version, total space, used space, available space, and device information.
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.
