Stop Oracle RAC Database : 4 Powerful srvctl Options

Stop oracle rac database

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.

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 and immediate is default)

Explanation of Stop Options

Oracle provides four shutdown optionssrvctl, each designed for different situations:

OptionDescription
normalWaits for all connected sessions to disconnect before shutting down
immediateRolls back active transactions and disconnects sessions (default option)
transactionalWaits for current transactions to complete before shutting down
abortForces 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 or oracle) when executing srvctl commands.

To dive deeper into Oracle RAC and srvctl:

These links provide essential knowledge for new and experienced Oracle DBAs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top