Oracle 19c rac集群管理 -------- 集群启停操作过程

Oracle rac集群启停操作过程

首先查看数据库的集群的db_unique_name

SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------------------------
cdb_cluster_name                     string
cell_offloadgroup_name               string
db_file_name_convert                 string
db_name                              string      p19c0
db_unique_name                       string      p19c0
global_names                         boolean     FALSE
instance_name                        string      p19c01
lock_name_space                      string
log_file_name_convert                string
pdb_file_name_convert                string
processor_group_name                 string

NAME                                 TYPE        VALUE
------------------------------------ ----------- -------------------------
service_names                        string      p19c0

--确认集群的instance_name

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME STATUS


p19c01 OPEN

p19c02 OPEN

Step 1.停止以及查看数据库
bash 复制代码
su - grid
srvctl stop database -d p19c0
srvctl status database -d p19c0 
Step 2.停止集群服务
bash 复制代码
su - root
/u01/app/19.3.0/grid/bin/crsctl stop cluster -all
Step 3.启动 集群服务(root):
bash 复制代码
/u01/app/19.3.0/grid/bin/crsctl start cluster -all --会启动数据库
/u01/app/19.3.0/grid/bin/crsctl start has --启动数据库
/u01/app/19.3.0/grid/bin/crsctl start crs
bash 复制代码
/u01/app/19.3.0/grid/bin/crsctl start cluster -all
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node1'
CRS-2672: Attempting to start 'ora.evmd' on 'node1'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'node2'
CRS-2672: Attempting to start 'ora.evmd' on 'node2'
CRS-2676: Start of 'ora.cssdmonitor' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'node1'
CRS-2672: Attempting to start 'ora.diskmon' on 'node1'
CRS-2676: Start of 'ora.diskmon' on 'node1' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'node2'
CRS-2672: Attempting to start 'ora.diskmon' on 'node2'
CRS-2676: Start of 'ora.diskmon' on 'node2' succeeded
CRS-2676: Start of 'ora.evmd' on 'node1' succeeded
CRS-2676: Start of 'ora.evmd' on 'node2' succeeded
CRS-2676: Start of 'ora.cssd' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'node1'
CRS-2672: Attempting to start 'ora.ctssd' on 'node1'
CRS-2676: Start of 'ora.cssd' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'node2'
CRS-2676: Start of 'ora.ctssd' on 'node1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'node1'
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'node2'
CRS-2676: Start of 'ora.ctssd' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'node2'
CRS-2676: Start of 'ora.asm' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'node2'
CRS-2676: Start of 'ora.asm' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'node1'
CRS-2676: Start of 'ora.storage' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'node1'
CRS-2676: Start of 'ora.crsd' on 'node1' succeeded
CRS-2676: Start of 'ora.storage' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'node2'
CRS-2676: Start of 'ora.crsd' on 'node2' succeeded
Step 4. 启动数据库:
bash 复制代码
crsctl status res -t
srvctl status database -d p19c0
srvctl start database -d p19c0


Oracle rac单节点重启操作过程

1.root查看系统监控进程

ps -ef|grep smon

2.切换到oracle用户

su - oracle

3.sys用户登录数据库

sqlplus / as sysdba

4.检查点切换 停库前执行 alter system checkpoint 很重要!

alter system checkpoint;

5.强制系统进行日志切换 6次

ALTER SYSTEM SWITCH LOGFILE;

6.关闭所有的容器数据库

alter pluggable database all close immediate;

7.关闭实例

srvctl stop instance -d p19c0 -i p19c01

退出oracle用户到root

su - root

8.设置在服务器启动时,自动启动crs守护进程

crsctl enable crs1.

9.强制关闭所有crs守护进程

crsctl stop crs -f1.

10.查看集群状态

crsctl status res -t1.

11.重启操作系统

shutdown

12.重启完成后操作

su - oracle

srvctl start instance -d p19c0 -i p19c01

crsctl status res -t1.2.3.4.5.
相关推荐
环能jvav大师1 分钟前
基于R语言的统计分析基础:使用SQL语句操作数据集
开发语言·数据库·sql·数据分析·r语言·sqlite
骆晨学长21 分钟前
基于springboot的智慧社区微信小程序
java·数据库·spring boot·后端·微信小程序·小程序
@月落27 分钟前
alibaba获得店铺的所有商品 API接口
java·大数据·数据库·人工智能·学习
楠枬37 分钟前
MySQL数据的增删改查(一)
数据库·mysql
goTsHgo42 分钟前
从底层原理上解释 clickhouse 保证完全的幂等性
数据库·clickhouse
阿华的代码王国2 小时前
MySQL ------- 索引(B树B+树)
数据库·mysql
Hello.Reader3 小时前
StarRocks实时分析数据库的基础与应用
大数据·数据库
执键行天涯3 小时前
【经验帖】JAVA中同方法,两次调用Mybatis,一次更新,一次查询,同一事务,第一次修改对第二次的可见性如何
java·数据库·mybatis
yanglamei19623 小时前
基于GIKT深度知识追踪模型的习题推荐系统源代码+数据库+使用说明,后端采用flask,前端采用vue
前端·数据库·flask
工作中的程序员3 小时前
ES 索引或索引模板
大数据·数据库·elasticsearch