Oracle彻底删除11gR2 GI

环境:RHEL 6.5 + Oracle 11.2.0.4 GI

需求:在搭建Standby RAC时,安装GI软件期间由于GI安装遇到一些问题,root脚本执行hang住,且无任何报错(跟踪/opt/app/11.2.0/grid/cfgtoollogs/crsconfig/rootcrs_jystdrac1.log也无任何报错,几小时都不再刷新),因为11.2后的root脚本是可以重复执行的,所以反复尝试执行root脚本,但结果均未成功。

由于这个虚拟的系统环境是直接从很久前自己做的实验直接复制过来的,只能是怀疑环境本身有问题,现在想完全重新安装GI,在这之前需要Oracle彻底删除11g GI,这个操作可以参考MOS文档:

How to completely remove 11.2 and 12.1 Grid Infrastructure, CRS and/or Oracle Restart - IBM: Linux on System z (文档 ID 1413787.1)

注:我这里的实验环境由于是GI并未完全成功安装成功,所以有些命令的输出可能并不是标准输出。

主要步骤如下:

1.删除CRS配置

删除CRS配置
使用root用户,执行
/opt/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose

[root@jystdrac1 install]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
PRCR-1119 : Failed to look up CRS resources of ora.cluster_vip_net1.type type
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'jystdrac1'
CRS-2673: Attempting to stop 'ora.crf' on 'jystdrac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'jystdrac1'
CRS-2677: Stop of 'ora.mdnsd' on 'jystdrac1' succeeded
CRS-2677: Stop of 'ora.crf' on 'jystdrac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'jystdrac1'
CRS-2677: Stop of 'ora.gipcd' on 'jystdrac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'jystdrac1'
CRS-2677: Stop of 'ora.gpnpd' on 'jystdrac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'jystdrac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

在GI的最后一个节点,你需要在rootcrs.pl命令后添加–lastnode参数

/opt/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -lastnode -verbose -force

[root@jystdrac2 ~]# /opt/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -lastnode -verbose -force
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Adding Clusterware entries to upstart
crsexcl failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: ****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
****Unable to retrieve Oracle Clusterware home.
Start Oracle Clusterware stack and try again.
Failure in execution (rc=-1, 0, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl stop res ora.registry.acfs -n jystdrac2 -f
Failure in execution (rc=-1, 0, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl delete res ora.registry.acfs -f
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
sh: /opt/app/11.2.0/grid/bin/crsctl: No such file or directory
Failure in execution (rc=-1, 32512, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl delete res ora.drivers.acfs -init -f
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Failure in execution (rc=-1, 32512, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl stop crs -f
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
################################################################
# You must kill processes or reboot the system to properly #
# cleanup the processes started by Oracle clusterware #
################################################################
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/ocr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Can't exec "/opt/app/11.2.0/grid/bin/clsecho": No such file or directory at /opt/app/11.2.0/grid/lib/acfslib.pm line 1464.
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Failure in execution (rc=-1, 256, No such file or directory) for command /etc/init.d/ohasd deinstall
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node

2.删除Oracle Restart

使用root用户,执行:
/opt/app/11.2.0/grid/crs/install/roothas.pl -deconfig -verbose -force

[root@jystdrac1 app]# /opt/app/11.2.0/grid/crs/install/roothas.pl -deconfig -verbose -force
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Delete failed, or completed with errors.
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
You must kill ohasd processes or reboot the system to properly
cleanup the processes started by Oracle clusterware
ACFS-9313: No ADVM/ACFS installation detected.
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Failure in execution (rc=-1, 256, No such file or directory) for command /etc/init.d/ohasd deinstall
Successfully deconfigured Oracle Restart stack

第二个节点:

[root@jystdrac2 ~]# /opt/app/11.2.0/grid/crs/install/roothas.pl -deconfig -verbose -force
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Failure in execution (rc=-1, 256, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl stop resource ora.cssd -f
Failure in execution (rc=-1, 256, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl delete resource ora.cssd -f
Failure in execution (rc=-1, 256, No such file or directory) for command /opt/app/11.2.0/grid/bin/crsctl stop has -f
You must kill ohasd processes or reboot the system to properly
cleanup the processes started by Oracle clusterware
Can't exec "/opt/app/11.2.0/grid/bin/clsecho": No such file or directory at /opt/app/11.2.0/grid/lib/acfslib.pm line 1464.
Either /etc/oracle/olr.loc does not exist or is not readable
Make sure the file exists and it has read and execute access
Failure in execution (rc=-1, 256, No such file or directory) for command /etc/init.d/ohasd deinstall
Successfully deconfigured Oracle Restart stack

3.修改 /etc/inittab

修改/etc/inittab,移除相关配置信息:

tail /etc/inittab
#h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
init q

我这里的实验环境这个文件还没有这个内容,所以不需要做操作,继续往下。

4.清除文件

按照MOS的描述,清除所有存在的相关文件:

If the Oracle Grid root.sh script has been run on any of the nodes previously, then the
Linux inittab file should be modified to remove the lines that were added.
Deconfig should remove this line but it is best to verify. tail /etc/inittab
#h1:35:respawn:/etc/init.d/init.ohasd run >/dev/null 2>&1 </dev/null
init q Clean up files The following commands are used to remove all Oracle Grid and database
software. You can also use the Oracle de-installer to remove the necessary software
components. #
#WARNING - You should verify this script before running this script as this
#script will remove everything for all Oracle systems on the Linux system where
#the script is run.
#
rm -f /etc/init.d/init.ohasd
#
rm -f /etc/inittab.crs
rm -rf /etc/oracle
#
# Oracle Bug Note:429214.1
#
rm -f /usr/tmp/.oracle/*
rm -f /tmp/.oracle/*
rm -f /var/tmp/.oracle/*
### WARNING: BE VERY CAREFUL - THIS WILL REMOVE THE ORATAB ENTRIES FOR ALL DATABASES RUNNING ON THIS SERVER AND ALSO THE CENTRAL INVENTORY FOR ANY ORACLE HOMES/GRID HOMES WHICH ARE CURRENTLY INSTALLED ON THIS SERVER. rm -f /etc/oratab
rm -rf /var/opt/oracle #
# Remove Oracle software directories *these may change based on your install en
# You need to modify the following to map to your install environment. rm -rf </u01/base/*> *********this is $ORACLE_BASE
rm -rf </u01/oraInventory> ****this is the central inventory loc pointed to by oraInst.loc
rm -rf </u01/grid/*> **********this is the Grid Home
rm -rf </u01/oracle> **********this is the DB Home#

5.重新安装前的准备

确认目录权限正确:

mkdir -p /opt/app/ && chown -R oracle:oinstall /opt/app/ && chmod 775 /opt/app && ls -lh /opt

安装cvuqdisk的rpm包

rpm -ivh /opt/app/media/grid/rpm/cvuqdisk-1.0.9-1.rpm

清除ocr/voting磁盘信息:

dd if=/dev/zero of=/dev/ bs=1M count=100

dd if=/dev/zero of=/dev/asm-diskb bs=1M count=100
dd if=/dev/zero of=/dev/asm-diskc bs=1M count=100
dd if=/dev/zero of=/dev/asm-diskd bs=1M count=100

然后所有节点重启主机,准备在清空所有配置后的环境下进行一次全新的GI安装。

Oracle彻底删除11gR2 GI的更多相关文章

  1. Deinstall卸载RAC之Oracle软件及数据库+GI集群软件

    Deinstall卸载Oracle软件及数据库+GI集群软件 1. 本篇文档应用场景: 需要安装新的ORACLE RAC产品,系统没有重装,需要对原环境中的RAC进行卸载: #本篇文档,在AIX 6. ...

  2. Oracle Database XE 11gR2 自带的用户,新建用户,修改用户密码

    操作系统:Windows 10 x64 第一节:下载 Oracle Database XE 11gR2 第二节:安装.验证安装 Oracle Database XE 11gR2 第三节:Oracle ...

  3. oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录)

    oracle 快速删除大批量数据方法(全部删除,条件删除,删除大量重复记录) 分类: ORACLE 数据库 2011-05-24 16:39 8427人阅读 评论(2) 收藏 举报 oracledel ...

  4. oracle数据库删除数据Delete语句和Truncate语句的对比

    oracle数据库删除数据Delete语句和Truncate语句的对比 当表中的数据不需要时,则应该删除该数据并释放所占用的空间,删除表中的数据可以使用Delete语句或者Truncate语句,下面分 ...

  5. oracle级联删除

    oracle级联删除可以使用触发器来实现,但是比较麻烦,最简单的就是直接建立表的主外键关系,给列设置级联删除. ------创建了CLASS表,并设置ID字段为主键. -- Create table ...

  6. oracle 中删除表 drop delete truncate

    oracle 中删除表 drop delete truncate   相同点,使用drop delete truncate 都会删除表中的内容 drop table 表名 delete from 表名 ...

  7. Oracle中删除用户下所有对象的多种方法

      Oracle删除用户下所有对象的方法未必人人都会,下面就为您介绍两种常用的Oracle删除用户下所有对象的方法,希望对您学习Oracle删除用户方面能有所帮助. 方法1: drop user XX ...

  8. ORACLE无法删除当前连接用户

    今天在做Oracle数据库是遇到ORACLE无法删除当前连接用户 ,经查找可用如下方法解决 . 在Oracle中删除用户时提示:ORACLE无法删除当前连接用户  可以用以下语句    Sql代码   ...

  9. Oracle 删除用户和表空间////Oracle创建删除用户、角色、表空间、导入导出、...命令总结/////Oracle数据库创建表空间及为用户指定表空间

    Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下 对于单个user和tablespace 来说, 可以使用如下命令来完成. 步骤一:  删除user drop ...

随机推荐

  1. jQuery属性操作(一)

    下载了jQuery的UI组件,发现内容还挺多的,还是决定先把jQuery的源码看完一遍之后再涉足UI组件.考虑到队列和动画使用较少,特别是动画,基本开始使用css3完成.因此暂时略过,开始看jQuer ...

  2. Linux上的ftp服务器vsftpd之配置满天飞--设置匿名用户访问(不弹出用户名密码框)以及其他用户可正常上传

    一.问题背景 没事谁折腾这鬼玩意哦...还不是因为bug. 我们的应用,用户头像是存在ftp上的.之前的ftp服务器是一台windows,我们后台服务器程序收到用户上传头像的请求时,会用一个ROOT/ ...

  3. php 函数合并 array_merge 与 + 的区别

    array_merge()是PHP语言中的一个函数,作用是将两个或多个数组的单元合并起来,一个数组中的值附加在前一个数组的后面.返回作为结果的数组. 如果输入的数组中有相同的字符串键名,该键的键值为最 ...

  4. 攻防对抗中常用的windows命令(渗透测试和应急响应)

    一.渗透测试 1.信息收集类 #查看系统信息 >systeminfo #查看用户信息 >net user >net user xxx #查看网络信息 >ipconfig /al ...

  5. MYSQL的索引和常见函数

    MySQL的索引 索引机制 MySQL属于关系型数据库,为了提高查询速度,可以创建索引. 索引:由表中的一个或多个字段生成的键组成,这些键存储在数据结构(B树或者hash表中),于是又分为B树索引(I ...

  6. 【JSP】JSP中的Java脚本

    前言 现代Web开发中,在JSP中嵌入Java脚本不是推荐的做法,因为这样 不利于代码的维护.有很多好的,替代的方法避免在JSP中写Java脚本.本文仅做为JSP体系技术的一个了解.     类成员定 ...

  7. 解决Android 5.0中出现的警告:Service Intent must be explicit

    extends:http://www.eoeandroid.com/thread-568853-1-1.html 本帖最后由 469874851 于 2015-3-11 18:15 编辑 有些时候我们 ...

  8. angular开发控制器之间的通信

    一.指令与控制器之间通信,无非是以下几种方法: 基于scope继承的方式 基于event传播的方式 service的方式(单例模式) 二.基于scope继承的方式: 最简单的让控制器之间进行通信的方法 ...

  9. centos7搭建docker私有仓库

    1.环境: [root@docker02 anchors]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@do ...

  10. ElasticSearch 安装 elasticsearch-analysis-ik分词器

    IK version ES version master 5.x -> master 5.6.1 5.6.1 5.5.3 5.5.3 5.4.3 5.4.3 5.3.3 5.3.3 5.2.2 ...