自动方式启停

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. 使用 Three.js 的 3D 制作动画场景

    推荐:将 NSDT场景编辑器 加入你的3D开发工具链. 由于 GSL 语法的复杂性,对于许多开发人员来说 WebGL 是一个未知的领域.但是有了 Three.js,在浏览器中 3D 的实现变得简单.下 ...

  2. SpringBoot 面试问答总结(VIP典藏版),最详细!全面!爆肝!

    最详细的SpringBoot面试问题干货,点赞收藏慢慢看 1.SpringBoot 面试问答总结 Spring Boot 是 Spring 开源组织下的子项目,是 Spring 组件一站式解决方案,主 ...

  3. RocketMQ - 消费者消费方式

    RocketMQ的消费方式包含Pull和Push两种 Pull方式:用户主动Pull消息,自主管理位点,可以灵活地掌控消费进度和消费速度,适合流计算.消费特别耗时等特殊的消费场景.缺点也显而易见,需要 ...

  4. LeetCode-1219 黄金矿工

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/path-with-maximum-gold 题目描述 你要开发一座金矿,地质勘测学家已经探明了这 ...

  5. mysql8.0.30主从配置

    安装包下载地址: https://downloads.mysql.com/archives/community/ 1. 解压介质包: # tar xf mysql-8.0.30-linux-glibc ...

  6. maven打包找不到本地jar包的解决方法

    有时候我们在项目中会引入一些本地jar包,在maven打包时会找不到这些jar,我们需要在pom.xml中的 <pluginManagement> <plugins> < ...

  7. replace 常用积累

    1.替换有,或者.为: obj.keyword.replace(/,|./g,';') 2.替换元素标签类似于<em>文字</em>这种 let name=item.name. ...

  8. Minio整合SpringBoot

    Minio整合SpringBoot POM: <dependency> <groupId>io.minio</groupId> <artifactId> ...

  9. CSS控制背景图片100%自适应填充布局

    原文地址:http://blog.csdn.net/wd4java/article/details/50537562 .personal_head { width: 100%; height: 35% ...

  10. TCP和UDP协议之间的区别与原理

    一.TCP和UDP协议之间的区别 TCP是基于连接的,而UDP是基于非连接的. TCP传输数据稳定可靠,适用于对网络通讯质量要求较高的场景,需要准确无误的传输给对方,比如,传输文件,发送邮件,浏览网页 ...