ORACLE_OCP之ASM启停

ORACLE_OCP之ASM启停

一、ASM停止

  1. 在oracle用户下,以sysdba

    [oracle@localhost.localdomain:/u01/database]$sqlplus / as sysdba
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 7 10:53:04 2021
    Copyright © 1982, 2016, Oracle. All rights reserved.
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL>

  2. 在grid用户下,以asm身份

    [grid@localhost.localdomain:/home/grid]$sqlplus / as sysasm
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 7 10:58:45 2021
    Copyright © 1982, 2016, Oracle. All rights reserved.
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    SQL> shutdown immediate
    ASM diskgroups dismounted
    ASM instance shutdown
    SQL>

  3. 关闭侦听

    [grid@localhost.localdomain:/home/grid]$lsnrctl stop
    LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 07-JAN-2021 11:01:39
    Copyright © 1991, 2016, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    The command completed successfully

  4. 彻底的将asm关闭

    [grid@localhost.localdomain:/home/grid]$crsctl stop has

二、ASM启动

  • 打开asm

    [grid@localhost.localdomain:/home/grid]$crsctl start has
    CRS-4123: Oracle High Availability Services has been started.

  • 打开数据库

    [oracle@localhost.localdomain:/u01/database]$sqlplus / as sysdba
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 7 10:50:51 2021
    Copyright © 1982, 2016, Oracle. All rights reserved.
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 838860800 bytes
    Fixed Size 8626240 bytes
    Variable Size 352325568 bytes
    Database Buffers 469762048 bytes
    Redo Buffers 8146944 bytes
    Database mounted.
    Database opened.
    SQL>

  • 启动侦听

    [grid@localhost.localdomain:/home/grid]$lsnrctl start

  • 已经打开

[grid@localhost.localdomain:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       localhost                STABLE
ora.FRADG.dg
               ONLINE  ONLINE       localhost                STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       localhost                STABLE
ora.asm
               ONLINE  ONLINE       localhost                Started,STABLE
ora.ons
               OFFLINE OFFLINE      localhost                STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       localhost                STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       localhost                STABLE
ora.orcl.db
      1        ONLINE  ONLINE       localhost                Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db_1,STABLE
--------------------------------------------------------------------------------
[grid@localhost.localdomain:/home/grid]$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值