Skip to Content
Author's profile photo Former Member

Oracle RAC useful commands in SAP Environment

Hello Everyone,

We are in a project now that involves Oracle RAC (2 nodes) and SAP ERP, the oracle white papers are big and some of the commands you need to learn to administrate the RAC environment are confuse so here are the most common and useful commands for your RAC system.

Previous Info:

RDBMS: Oracle 11.2.0.4

RAC Node 1: erpdb01

RAC Node 2: erpdb02

SAP SID: PRD

DB SID:PRD

RAC Instances: PRD1 and PRD2

First log with user oracle in any node of the RAC database (first node in my case):

RAC1.png

Now we check the actual status of the database. Both RAC instances (PRD1 and PRD2) are running.

     srvctl status database -d PRD

RAC2.png

To stop only the instance PRD1 in the first RAC node we use this command:

     srvctl stop instance -d PRD -i PRD1

RAC3.png

The same works for stopping the second RAC instance.

     srvctl stop instance -d PRD -i PRD2

RAC4.png

For starting the instances separately we change the “stop” command for start like this:

     srvctl start instance -d PRD -i PRD1

RAC5.png

     srvctl start instance -d PRD -i PRD2

RAC6.png

Normally we use this commands to stop only one RAC instance for a schedule outage (patching for example), but when you need to stop directly both instances PRD1 and PRD2 you can use this command.

      srvctl stop database -d PRD

RAC7.png

For starting both instances change the “stop” command for “start”

     srvctl start database -d PRD

RAC8.png

Sometimes when the database don’t start you can check if the ASM services is running with this command:

     srvctl status asm

RAC9.png

With this command you can check the cluster services:

     go to the GRID path /oracle/GRID/112_64/bin

     crsctl check cluster -all

RAC10.png

To check the status of the voting disks

     go to the GRID path /oracle/GRID/112_64/bin

     ./crsctl query css votedisk

RAC11.png

To check the status of the scan_listener (This installation have only 3, you can have more)

     srvctl status scan_listener

RAC12.png

To check the status of the nodeapps you use:

     srvctl status nodeapps -n erpdb01

     srvctl status nodeapps -n erpdb02

RAC13.png

This command can be very useful too, you can check the status, running node, etc of all components in the RAC.

     crs_stat -t

RAC14.png

Hope it helps you in your journey. Enjoy!

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Excellent post, it really helped me. Thank you

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks for the support!

      Author's profile photo Former Member
      Former Member

      Good document...

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thank you for the feedback, if it helped you maybe can rate it or like it?. Regards

      Author's profile photo Former Member
      Former Member

      Good post and quite helpful in RAC and exadata enviorments. I always keep this ones handy in my notes 🙂

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks for the support, I'm preparing a new document with sapctl useful commands