Shutdown one node in RAC

oracleoracle-asmrac

I want to shutdown one node in RAC. I did the following steps:

  1. Shutdown database instance

    export ORACLE_SID=mydb1
    sqlplus / as sysdba
    shutdown immediate;

  2. shutdown ASM instance

    . oraenv
    +ASM1
    sqlplus / as sysasm
    shutdown immediate;

But shows the following error: ORA-15097: cannot SHUTDOWN ASM instance with connected client

Please, tell me what steps should I do to shutdown all services and instances on the server which is the part of the RAC?

Best Answer

DISCLAIMER : Not an Oracle DBA

Use srvctl, the grid control program that allows you to manipulate parts of the RAC Cluster

Usage: srvctl <command> <object> [<options>]
    commands: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
    objects: database|instance|service|nodeapps|vip|asm|diskgroup|listener|srvpool|server|scan|scan_listener|oc4j|home|filesystem|gns
For detailed help on each command and object and its options use:
  srvctl <command> -h or
  srvctl <command> <object> -h

Examples

srvctl stop database -d mydb 
srvctl stop instance -i mydb1

Please get an expert to perform these, especially since you want to do something with ASM. If I recall, ASM is a proprietary Oracle file system. Using srvctl would be better than trying to handle it yourself.

Here is more help on srvctl

$ srvctl stop database -h

Stops the database.

Usage: srvctl stop database -d <db_unique_name> [-o <stop_options>] [-f]
    -d <db_unique_name>      Unique name for the database
    -o <stop_options>        Options to shutdown command (e.g. normal, transactional, immediate, or abort)
    -f                       Force stop
    -h                       Print usage
$ srvctl stop instance -h

Stops the database instance.

Usage: srvctl stop instance -d <db_unique_name> {-n <node_name> | -i <inst_name_list>}  [-o <stop_options>] [-f]
    -d <db_unique_name>      Unique name for the database
    -n <node_name>           Node name
    -i "<inst,...>"          Comma separated instance names
    -o <stop_options>        Options to shutdown command (e.g. normal, transactional, immediate, or abort)
    -f                       Force stop
    -h                       Print usage
$ srvctl stop asm -h

Stops ASM instance.

Usage: srvctl stop asm [-n <node_name>] [-o <stop_options>] [-f]
    -n <node_name>           Node name
    -o <stop_options>        Options to shutdown command (e.g. normal, transactional, immediate, or abort)
    -f                       Force stop
    -h                       Print usage
$
Related Question