自动方式启停

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. $(...).bootstrapTable is not a function (已解决)

    1.首先保证Jquery是不是在所有js最前面引入且引入地址正确能打开 2.页面jquery不能重复引入,我这边就是重复引用了导致报错的

  2. PG统计信息和系统表

    一.PG统计信息概述 pg的统计信息主要分为两种: 第一类统计信息是是负载指标"统计信息"(Monitoring stats),通过stat collector进程进行实时采集更新 ...

  3. 码云或github的"免费服务器"

    目录 一. 码云及工具介绍 二. 操作步骤 (1) 创建vue-cli项目 (2) 码云创建仓库 (3) 修改并提交项目到码云仓库 (4) 运行项目 (5) 注意点 三. 尾声 对于学生党来说,买个服 ...

  4. docker swarm集群安装使用

    1.安装master docker swarm init --advertise-addr 10.98.10.186 Swarm initialized: current node (qemrm3oq ...

  5. vue3 loading 等待效果

    一.自定义组件 loading.vue <template> <div class="loading" v-show="msg.show"&g ...

  6. 设置view的圆角和阴影

    1.设置view圆角 self.backView.clipsToBounds = YES; self.backView.layer.cornerRadius = 6.f; 2.设置view阴影 sel ...

  7. CCIE DC Multicast Part 4.

    Hi Guys, Part 4 of my CCIE DC multicast article is presented below, in this article we are going to ...

  8. nodejs,阿里云手机号一键登录

    const Core = require('@alicloud/pop-core'); const accessKeyId = "xxxx" const accessSecret ...

  9. moco的使用方法

    需要模拟第三方接口测试并调用,找了很多mock工具,在git上找到了moco,学习一番,分享一下. 一.下载moco,moco地址 下载后,是一个jar包. 二.配置moco的配置文件 (1)在jar ...

  10. java方法的笔记

    方法 方法的概念 方法(method)是将具有独立功能的代码块组织成为一个整体,使其具有特殊功能的代码集 注意: 方法必须先创建才可以使用,该过程成为方法定义 方法创建后并不是直接可以运行的,需要手动 ...