
Stop Oracle RAC Database operations must be done carefully to keep it highly available and protect your data. Oracle offers the srvctl
command-line tool to manage cluster resources like databases, listeners, and services in RAC environments.
In this post, you’ll learn how to stop an Oracle RAC database using srvctl
utility, with clear examples and explanations for all available shutdown options.
Table of Contents
What Is srvctl
?
srvctl
is a command-line tool that comes with Oracle Grid Infrastructure. It helps DBAs manage Oracle RAC components like databases, instances, services, listeners, and VIPs. You can use it to start, stop, enable, disable, or check the status of these resources in an RAC cluster.
Syntax to Stop Oracle RAC Database
Here’s the official syntax to stop a RAC database using srvctl
:
srvctl stop database -d <db_name> [-o <stop_options>]
-d <db_name>
: Name of the database to stop (e.g.,PRODB
)-o <stop_options>
: Defines the shutdown method (It is optional andimmediate
is default)
Explanation of Stop Options
Oracle provides four shutdown optionssrvctl
, each designed for different situations:
Option | Description |
---|---|
normal | Waits for all connected sessions to disconnect before shutting down |
immediate | Rolls back active transactions and disconnects sessions (default option) |
transactional | Waits for current transactions to complete before shutting down |
abort | Forces the shutdown without rolling back transactions or disconnecting users cleanly |
srvctl Command Example
Here are practical examples of using srvctl
to stop a RAC database using each shutdown option:
# Normal shutdown (waits for users to disconnect)
srvctl stop database -d PRODB -o normal
# Immediate shutdown (recommended for most use cases)
srvctl stop database -d PRODB -o immediate
# Transaction-safe shutdown (allows active transactions to finish)
srvctl stop database -d PRODB -o transactional
# Force shutdown (use only if other methods fail)
srvctl stop database -d PRODB -o abort
Best Practices for Stopping RAC Databases
- Always check the status before and after Stopping RAC database using the below command:
srvctl status database -d PRODB
- Use
immediate
for most planned maintenance tasks. - Use
transactional
if users are running long-running transactions and you want to avoid data loss. - Only use
abort
during emergencies or unresponsive states. - Make sure you are logged in as the Oracle Grid Infrastructure owner (e.g.,
grid
ororacle
) when executingsrvctl
commands.
To dive deeper into Oracle RAC and srvctl
:
- Oracle SRVCTL Utility Guide (Official) – Learn every command and parameter from Oracle’s documentation.
- How to Start Oracle Database Using srvctl – Our internal guide on safely starting databases using
srvctl
.
These links provide essential knowledge for new and experienced Oracle DBAs.