Thursday 9 February 2017

How shutdown standalone asm instance in oracle


In this post we going to see how to bring down the standalone asm instance normally.Below are the sequences for the same.

First we need to bring down the databases.

[oracle@oracle ~]$ ps -ef|grep pmon
grid       3135      1  0 20:03 ?        00:00:00 asm_pmon_+ASM
oracle     3254      1  0 20:04 ?        00:00:00 ora_pmon_orcl
oracle     3696   3203  0 20:10 pts/0    00:00:00 grep --color=auto pmon
[oracle@oracle ~]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Thu Feb 9 20:10:36 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@oracle ~]$ ps -ef|grep pmon
grid       3135      1  0 20:03 ?        00:00:00 asm_pmon_+ASM
oracle     3714   3203  0 20:11 pts/0    00:00:00 grep --color=auto pmon


Now db has been down next switch to grid user and bring down the ASM instance with sysasm privilege.

[oracle@oracle ~]$ su - grid
Password:
Last login: Thu Feb  9 20:02:32 PST 2017 on pts/0
[grid@oracle ~]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Thu Feb 9 20:13:24 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter user-name: / as sysasm

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> shut immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option


Now check the status of cluster resources then bring down the all cluster resources.

[grid@oracle ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               OFFLINE OFFLINE      oracle                   STABLE
ora.DATA.dg
               OFFLINE OFFLINE      oracle                   STABLE
ora.FRA.dg
               OFFLINE OFFLINE      oracle                   STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       oracle                   STABLE
ora.ORA_LISTENER.lsnr
               ONLINE  OFFLINE      oracle                   STABLE
ora.asm
               OFFLINE OFFLINE      oracle                   STABLE
ora.ons
               OFFLINE OFFLINE      oracle                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       oracle                   STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       oracle                   STABLE
ora.orcl.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.orcl1.db
      1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                             ABLE
--------------------------------------------------------------------------------
[grid@oracle ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'oracle'
CRS-2673: Attempting to stop 'ora.evmd' on 'oracle'
CRS-2677: Stop of 'ora.evmd' on 'oracle' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oracle'
CRS-2677: Stop of 'ora.cssd' on 'oracle' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'oracle' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle' has completed
CRS-4133: Oracle High Availability Services has been stopped.



No comments:

Post a Comment