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.
相关推荐
数据皮皮侠1 小时前
最新上市公司业绩说明会文本数据(2017.02-2025.08)
大数据·数据库·人工智能·笔记·物联网·小程序·区块链
小云数据库服务专线1 小时前
GaussDB数据库架构师修炼(十六) 如何选择磁盘
数据库·数据库架构·gaussdb
码出财富2 小时前
SQL语法大全指南
数据库·mysql·oracle
异世界贤狼转生码农4 小时前
MongoDB Windows 系统实战手册:从配置到数据处理入门
数据库·mongodb
QuZhengRong4 小时前
【数据库】Navicat 导入 Excel 数据乱码问题的解决方法
android·数据库·excel
码农阿豪4 小时前
Windows从零到一安装KingbaseES数据库及使用ksql工具连接全指南
数据库·windows
时序数据说10 小时前
时序数据库市场前景分析
大数据·数据库·物联网·开源·时序数据库
听雪楼主.13 小时前
Oracle Undo Tablespace 使用率暴涨案例分析
数据库·oracle·架构
我科绝伦(Huanhuan Zhou)13 小时前
KINGBASE集群日常维护管理命令总结
数据库·database
妖灵翎幺13 小时前
Java应届生求职八股(2)---Mysql篇
数据库·mysql