自动方式启停

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. AOP 编程

    1.静态代理 定义一个接口,用以规定执行方法 public interface IOrderProcessor { void Submit(); } 实现执行方法 public class Order ...

  2. mysql的双1设置是什么?

    innodb_flush_log_at_trx_commit和sync_binlog 两个参数是控制MySQL磁盘写入策略以及数据安全性的关键参数.如果innodb_flush_log_at_trx_ ...

  3. nginx反向代理hyperf

    location / {     #反向代理到 本地9501端口     proxy_pass http://127.0.0.1:9501;     proxy_redirect off;     p ...

  4. Redis Stream类型的使用详解

    目录 一.背景 二.redis中Stream类型的特点 三.Stream的结构 四.Stream的命令 1.XADD 往Stream末尾添加消息 1.命令格式 2.举例 2.XRANGE查看Strea ...

  5. Apache druid笔记

    Apache Duid学习笔记2 1.历史节点的查询效率与内存数据比成正比,内存越大则读取磁盘的次数越少, 历史节点内存越大总数据量越小则查询速度越快. 2.缓存机制可以选择外部和内部缓存,外部缓存如 ...

  6. 发誓要学会wepack

    9.9 学习资料: http://webpack.wuhaolin.cn/   <深入浅出Webpack> https://github.com/zshno1/wepack-study w ...

  7. html 1.0

    <html><head> <title></title></head><body><h3 align="cent ...

  8. Ubuntu18.04LTS虚拟机优化

    1.没网 刚安装好没网,可以设置NAT连接,也可以直接设置为桥接模式联网.这里直接桥接. 网络中心使用的是以太网,所以就在菜单的"编辑"里的"虚拟网络编辑器"里 ...

  9. pure-ftpd

    1.安装服务 yum install epel-release yum -y install pure-ftpd 2.启动服务如果报错,看一下是否是缺库文件导致. locate libpq.so.5 ...

  10. JSP过滤器、Session监听器、Servlet控制器的关系和执行顺序

    1.首先配置好过滤器和监听器,访问index.jsp页面(在index.jsp中设置session的Attribute属性.session的失效时间,查看的顺序是什么?); 1.运行Tomact的结果 ...