首页 > 数据库 >[Oracle19C ASM管理] ASM服务的启停

[Oracle19C ASM管理] ASM服务的启停

时间:2023-02-13 21:45:36浏览次数:54  
标签:Oracle19C STABLE centos7 启停 grid ASM ONLINE 19c ora

自动方式启停

crsctl stat res -t 查看ASM服务的状态,it's ok that ora.ons和ora.diskmon是OFFLINE

[[email protected]:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       centos7-19c              STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       centos7-19c              STABLE
ora.asm
               ONLINE  ONLINE       centos7-19c              Started,STABLE
ora.ons
               OFFLINE OFFLINE      centos7-19c              STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.orcl.db
      1        ONLINE  ONLINE       centos7-19c              Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
--------------------------------------------------------------------------------

停止ASM服务
crsctl stop has
has = High Availability Service

[[email protected]:/home/grid]$crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'centos7-19c'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'centos7-19c'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'centos7-19c'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'centos7-19c' succeeded
CRS-2677: Stop of 'ora.orcl.db' on 'centos7-19c' succeeded
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'centos7-19c'
CRS-2677: Stop of 'ora.DATADG.dg' on 'centos7-19c' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'centos7-19c'
CRS-2673: Attempting to stop 'ora.asm' on 'centos7-19c'
CRS-2677: Stop of 'ora.evmd' on 'centos7-19c' succeeded
CRS-2677: Stop of 'ora.asm' on 'centos7-19c' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'centos7-19c'
CRS-2677: Stop of 'ora.cssd' on 'centos7-19c' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'centos7-19c' has completed
CRS-4133: Oracle High Availability Services has been stopped.

开启ASM服务
crsctl start has

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

手动方式启停ASM

grid用户下关闭监听,因为监听只是运行在grid用户,和oracle用户没有关系
lsnrctl stop


[[email protected]:/home/grid]$lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 13-FEB-2023 21:06:47

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centos7-19c)(PORT=1521)))
The command completed successfully

这时查看crsctl stat res -t , 可以看到listener已经OFFLINE。

[[email protected]:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       centos7-19c              STABLE
ora.LISTENER.lsnr
               OFFLINE OFFLINE      centos7-19c              STABLE
ora.asm
               ONLINE  ONLINE       centos7-19c              Started,STABLE
ora.ons
               OFFLINE OFFLINE      centos7-19c              STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.orcl.db
      1        ONLINE  ONLINE       centos7-19c              Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
--------------------------------------------------------------------------------

进入Oracle用户停止数据库

[[email protected]:/home/oracle]$sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Feb 13 21:08:28 2023
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

切换回grid用户,可以看到数据库已经停止

[[email protected]:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       centos7-19c              STABLE
ora.LISTENER.lsnr
               OFFLINE OFFLINE      centos7-19c              STABLE
ora.asm
               ONLINE  ONLINE       centos7-19c              Started,STABLE
ora.ons
               OFFLINE OFFLINE      centos7-19c              STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.orcl.db
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------

在grid用户下, 使用sqlplus / as sysasm 链接, 使用shutdown immediate关闭ASM服务

[[email protected]:/home/grid]$sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Feb 13 21:11:55 2023
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown

目前只剩ora.cssd, ora.evmd是开启状态的。使用crsctl stop has关闭他们

[[email protected]:/home/grid]$crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'centos7-19c'
CRS-2673: Attempting to stop 'ora.evmd' on 'centos7-19c'
CRS-2677: Stop of 'ora.evmd' on 'centos7-19c' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'centos7-19c'
CRS-2677: Stop of 'ora.cssd' on 'centos7-19c' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'centos7-19c' has completed
CRS-4133: Oracle High Availability Services has been stopped.

手工启动ASM

手工关闭ASM后,grid用户使用crsctl start has 启动。

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

切换到oracle用户启动数据库服务,

[[email protected]:/home/grid]$su - oracle
Password:
Last login: Mon Feb 13 21:08:22 CST 2023 on pts/0
[[email protected]:/home/oracle]$sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Feb 13 21:23:16 2023
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  838858176 bytes
Fixed Size                  8902080 bytes
Variable Size             222298112 bytes
Database Buffers          599785472 bytes
Redo Buffers                7872512 bytes
Database mounted.
Database opened.

然后切回grid,crsctl stat res -t 可以看到所有服务都已启动。

[[email protected]:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATADG.dg
               ONLINE  ONLINE       centos7-19c              STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       centos7-19c              STABLE
ora.asm
               ONLINE  ONLINE       centos7-19c              Started,STABLE
ora.ons
               OFFLINE OFFLINE      centos7-19c              STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       centos7-19c              STABLE
ora.orcl.db
      1        ONLINE  ONLINE       centos7-19c              Open,HOME=/u01/app/o
                                                             racle/product/19c/db
                                                             _1,STABLE
--------------------------------------------------------------------------------

标签:Oracle19C,STABLE,centos7,启停,grid,ASM,ONLINE,19c,ora
From: https://www.cnblogs.com/slqleozhang/p/17117850.html

相关文章

  • 通过Nacos配置刷新进行RabbitMQ消费者在线启停
    前提公司在做一些金融相关业务,某些时候由于数据提供商定期维护或者特殊原因需要暂停某些服务的消费者。之前选用的消息队列技术栈是RabbitMQ,用于微服务之间的消息投递,对于......
  • go+proxy-wasm-go-sdk+tinygo 开发 wasm
    一、创建项目gomodinitxxxxxx二、安装proxy-wasm-go-sdkgogetgithub.com/tetratelabs/proxy-wasm-go-sdk三、创建main.go文件touchmain.go四、编辑代码1p......
  • linux安装oracle19c
    第一步:检查Linux系统版本1.执行命令lsb_release-a查看系统版本目前我使用的是阿里云丐版服务器,系统为CentOS7.3-x64第二步:下载Oracle19c的安装包和预安装包1.下载......
  • 服务网格 ASM 2022年12月产品动态
    ......
  • Oracle19c 解决ORA-28001
    今天一个网页出现404错误查看tomcat日志发现是数据库连接不上了,报错信息上可以看出是用户的口令(密码)失效了,查阅相关资料,发现oracle12c会默认给每一个用户的口令180天的有效......
  • [Oracle19C 数据库管理] 加载和传输数据库
    移动数据的通用架构数据泵datapump(impdp,expdp),借助DBMS_DATAPUMP存储过程,可以进行表的导出导入,行记录的导出导入,表空间的导出导入或者整个schema的导出导入。使用数......
  • [Oracle19C 数据库管理] 配置数据库审计
    以下内容未经整理占位强制审计:无法关闭此审计,比如记录数据库的开启和关闭。标准审计:基于值得审计:创建触发器,基于值进行记录。Trigger占用资源多细粒度审计:加一些where......
  • win11开启hdr影响显卡风扇智能启停
    京东买了pny4090,开机风扇就一直转,gpu使用率2%,温度26度,功耗40w这款商品说明里面是支持智能启停的,而且没看到网上有人说这方面的问题虽然事儿不大,但强迫症不能忍百度了一......
  • mac安装emsdk使用wasm
    gitclonehttps://github.com/emscripten-core/emsdk.gitpyenvlocal3.8.0./emsdkinstalllatesthttps://xmanyou.com/wasm-emsdk-mac-start-up/js调用wasmhttp......
  • [Oracle19C 数据库管理] 用户与权限管理
    用户管理用户具有以下属性:用户名:不能超过30位。不能包含特殊字符。必须用字符开头。用户名不区分大小写。认证方式:最常见的是密码认证。默认永久表空间:控制用户可......