自动方式启停

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

[grid@centos7-19c.localdomain:/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

[grid@centos7-19c.localdomain:/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

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

手动方式启停ASM

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

lsnrctl stop


[grid@centos7-19c.localdomain:/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。

[grid@centos7-19c.localdomain:/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用户停止数据库

[oracle@centos7-19c.localdomain:/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用户,可以看到数据库已经停止

[grid@centos7-19c.localdomain:/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服务

[grid@centos7-19c.localdomain:/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关闭他们

[grid@centos7-19c.localdomain:/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 启动。

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

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

[grid@centos7-19c.localdomain:/home/grid]$su - oracle
Password:
Last login: Mon Feb 13 21:08:22 CST 2023 on pts/0
[oracle@centos7-19c.localdomain:/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 可以看到所有服务都已启动。

[grid@centos7-19c.localdomain:/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 ASM管理] ASM服务的启停的更多相关文章

  1. 2.3 Nginx服务的启停控制

    在Linux平台下,控制Nginx服务的启停有多种方法 2.3.1 Nginx服务的信号控制 在Nginx服务的启停办法中,有一类是通过信号机制来实现的,Nginx服务器的信号控制如下: Nginx服 ...

  2. hdfs核心主件服务的启停方式

    停止mapreduce服务 /hadoop/hadoop-2.6.4/sbin/stop-yarn.sh 启动mapreduce服务 /hadoop/hadoop-2.6.4/sbin/start-y ...

  3. 04. 启停redis服务

    启动 查看redis.conf文件,可以通过general中的说明,配置通过systemd来启停redis和查看redis状态(作者没有采用,而是使用service管理,service配置参考< ...

  4. OCM_第十六天课程:Section7 —》GI 及 ASM 安装配置 _安装 GRID 软件/创建和管理 ASM 磁盘组/创建和管理 ASM 实例

    注:本文为原著(其内容来自 腾科教育培训课堂).阅读本文注意事项如下: 1:所有文章的转载请标注本文出处. 2:本文非本人不得用于商业用途.违者将承当相应法律责任. 3:该系列文章目录列表: 一:&l ...

  5. oracle之二ASM 管理

    Oracle ASM 管理(PPT-II:602-636) 16.1 什么是ASM 自动存储管理即ASM(Automatic Storage Management),是Oracle提供的一项管理磁盘的 ...

  6. 编写Redis启停服务脚本

    脚本内容如下; fi   esac   exit$RETVAL 下载脚本:艺搜下载 将下载下来的脚本放在/etc/init.d/目录下 更改脚本权限 chmod 777 /etc/init.d/red ...

  7. 如何管理linux开机自启服务

    如何管理linux开机自启服务? 自启动服务非常重要,例如 (1)需要手动添加希望自启的服务,如安装svn后没有自动添加,就需要我们手动加入(2)安装某些程序后,自动加到自启动了,但我们不需要,需要手 ...

  8. 使用 ASMCMD 工具管理ASM目录及文件

    ============================== -- 使用ASMCMD 工具管理ASM目录及文件 --============================== 在ASM实例中,所有的 ...

  9. rac下asm管理的表空间-数据文件的重命名

    asm下表空间的重命名与普通文件系统下的表空间重命名原理是一样的,只不过asm管理的数据文件有一些需要注意的地方,另外在asm下操作数据文件需要格外小心,稍有不慎将会造成数据文件丢失,如可以做备份最好 ...

  10. 【Oracle】Oracle ASM管理监控命令

    目录 Oracle ASM管理监控命令 目的: 1.查看磁盘组 2.查看目前归档 3.查看ASM的磁盘路径 4. asmcmd Oracle ASM管理监控命令 目的: 查看目前Oracle ASM相 ...

随机推荐

  1. Json.stringfiy json未定义

    在文档的顶部添加 <!DOCTYPE html> 没有它,IE10是一个奇怪的兼容模式,许多"新"功能不可用,例如JSON.如果你任然需要使用早期版本的IE,你可以使用 ...

  2. nodejs npm错误Error:UNKNOWN:unknown error,mkdir 'D:\Develop\nodejs\node_global'at Error(可行)

    错误原因 在设置npm的cache和predix时,因为使用参考其他教程照抄,而没有修改为本机对应路径,本机上并没有这个地址,因此造成了错误. npm config set cache "D ...

  3. 05#Web 实战:可拖拽的侧边栏

    效果演示图 可拖拽的左.右侧边栏的使用情况还是挺多的,博客园后台管理的左侧边栏就可以拖拽哟!效果演示如下图: HTML 代码 <div class="container"&g ...

  4. linux上安装python3(yum方式)

    可联通外网的linux系统终端上安装python3 1,建立yum仓库: https://mirrors.163.com/centos/7.9.2009/os/x86_64/ 2,使用yum下载安装对 ...

  5. 13.OpenFeign测试远程调用

    以会员服务调用优惠券服务为例 引入依赖 在之前创建微服务模块时已经引入了这个依赖,就不需要重复引入了 添加要被member微服务调用的coupon微服务的coupon的方法 在member微服务添加一 ...

  6. virtualenv指定使用本地某个版本python

    virtualenv -p D:\env\py37_1\Scripts\python3.exe time01 红色的地方是 你本地python解释器的安装路径,后面黄色部分是创建的虚拟环境的名称. 另 ...

  7. hexo-theme-tree

    Hexo 主题 Tree 一个简洁的主题,主要功能是 "树状导航" + "树状目录",可选配"评论"和"阅读量"功能,支 ...

  8. iOS 静态库与动态库的区别

    静态库相关命令 查看静态库架构 lipo -info ***.a 合并两个不同架构的库 lipo -create **.a  **.a -output  hecheng.a

  9. ggplot2绘制饼图

    # 加载 ggplot2 包 library(ggplot2) # 加载数据 data <- data.frame(category = c("A", "B&quo ...

  10. flask-基础篇03 请求钩子与上下文

    一.异常处理 1.HTTP 异常主动抛出 ①abort 方法: 抛出一个给定状态代码的 HTTPException 或者 指定响应,例如想要用一个页面未找到页面未找到异常来终止请求,你可以调用 abo ...