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.
相关推荐
Hello.Reader1 小时前
RedisJSON 路径语法深度解析与实战
数据库·redis·缓存
TDengine (老段)2 小时前
TDengine 使用最佳实践(2)
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
设计师小聂!4 小时前
Linux系统中部署Redis详解
linux·运维·数据库·redis
kfepiza4 小时前
Debian-10编译安装Mysql-5.7.44 笔记250706
linux·数据库·笔记·mysql·debian·bash
Touper.4 小时前
Redis 基础详细介绍(Redis简单介绍,命令行客户端,Redis 命令,Java客户端)
java·数据库·redis
不剪发的Tony老师5 小时前
phpMyAdmin:一款经典的MySQL在线管理工具又回来了
数据库·mysql·phpmyadmin
极限实验室5 小时前
TDBC 2025 可信数据库发展大会,极限科技邀您来赴约!
数据库
lixia0417mul26 小时前
使用Starrocks替换Clickhouse的理由
数据库
张璐月7 小时前
mysql的性能优化:组提交、数据页复用、全表扫描优化、刷脏页
数据库·mysql·性能优化
沐尘而生8 小时前
【AI智能体】智能音视频-搭建可视化智能体
数据库·人工智能·ai作画·音视频·娱乐