一

环境介绍
1.1 环境背景
一套19c集群要卸载
节点一用静默
节点二用手动
1.2 停集群及数据库
两节点分别执行
1.srvctl stop database -d oracle_19c
2.srvctl stop nodeapps -n orcl1 orcl2
3.srvctl status database -d orcl #检查
4.crsctl status res -t #检查

二

静默卸载
2.1 节点一卸载集群
cd $ORACLE_HOME/deinstall
./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /xxxxxxx
############ ORACLE DECONFIG TOOL START ##################################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##Checking for existence of the Oracle home location /u01/app/19.3.0/grid
....
The following nodes are part of this cluster: orcl1,orcl2
Active Remote Nodes are orcl1
Checking for sufficient temp space availability on node(s) : 'orcl1,orcl2'
##[END] Install check configuration##
---------------------------------------->
The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on the local node after the execution completes on all the remote nodes.
....
##按照提示在指定的node 跑生成的paramfile##
##如果前面的checking node 没检查到双节点
选择了yes可以填写双节点以及信息
选择了no填写了单节点(执行脚本目前节点的信息)也会生成单节点卸载脚本##
<----------------------------------------
2.2 执行脚本
1.新开窗口执行脚本
"/u01/app/19.3.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2026-06-18_17-00-24PM/response/deinstall_OraGI19Home1.rsp"2.执行完毕回原窗口回车enter 结束任务
3.grid用户会存在删除失败情况,要自己手动删目录
# rm -rf /etc/oraInst.loc
# rm -rf /opt/ORCLfmap

三

手动卸载
3.1 清理ORACLE SOFT
3.1.1.echo $ORACLE_HOME
3.1.2.echo $ORACLE_BASE
3.1.3.su - root
rm -rf $ORACLE_HOME $ORACLE_BASE
3.2 软件附带文件清理
3.2.1.删除/usr/local/bin/下的文件rm -rf /usr/local/bin/dbhomerm -rf /usr/local/bin/oraenvrm -rf /usr/local/bin/coraenv
3.2.2.删除/etc下的文件rm -rf /etc/oratabrm -rf /etc/oraInst.locrm -rf /etc/oracle
3.3 清理GRID SOFT
3.3.1.echo $ORACLE_HOME
3.3.2.echo $ORACLE_BASE
3.3.3.su - root
rm -rf $ORACLE_HOME $ORACLE_BASE
3.4 软件附带文件清理
3.4.1删除/etc下的配置文件cd /etc/rm -rf /etc/ora*
3.4.2删除/etc/init/下的配置文件
cd /etc/init/rm -rf /etc/init.d/oracle*
3.4.3删除/etc/init.d/下的配置文件
cd /etc/init.d/rm -rf /etc/init.d/init.ohasdrm -rf /etc/init.d/ohasdrm -rf /etc/init.d/init.tfa
3.4.4删除/var/tmp/.oracle 集群注册信息rm -f /var/tmp/.oracle
3.4.5删除/tmp下安装临时信息cd /tmp
rm -rf /tmp/CVU*rm -rf /tmp/OraInstall*

3.4 格式化ASM磁盘组
dd if=/dev/zero of=/dev/asm-diskb bs=1024 count=1000
3.4 检查残余进程
ps -ef | grep crsps -ef | grep oraps -ef | grep gridkill -9 PID


—— E N D ——
文字:kk
配图: kk
长
按
关
注

夜雨聆风