sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 运维DBA >

【学习笔记】Oracle不同操作系统手动卸载数据库Grid软件和ASM软件

时间:2016-11-07 09:14   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心学习笔记:分享一篇关于Oracle数据库卸载笔记,详细介绍不同操作系统Linux、HPunux、AIX各系统卸载删除Grid、ASM等软件。

1、快速删除

AIX平台
rm /etc/rc.d/rc2.d/K19ohasd
rm /etc/rc.d/rc2.d/S96ohasd
rm -f /etc/init.tfa
rm -f /etc/inittab.tfa
rm -f /etc/init.ohasd
cp /etc/inittab.no_tfa /etc/inittab
rm -rf /etc/inittab.crs
rm -rf /etc/inittab.no_crs
rm -rf /etc/inittab.no_tfa
rm -rf /etc/inittab.nocrs10205
rm -rf /etc/inittab.orig
rm -rf /etc/inittab.pre10205
rm -rf /etc/inittab.tfa
rm -rf /etc/oratab
rm -rf /etc/oraIn*
rm -rf /etc/oracle*
rm -rf /etc/ora*
rm -rf /tmp/.oracle
rm -rf /tmp/ora*
rm -rf /var/tmp/.oracle
rm -rf /tmp/CVU*
rm -rf /tmp/Ora*
rm -rf /home/grid/.oracle
rm -rf /usr/local/bin/dbhome
rm -rf /usr/local/bin/oraenv
rm -rf /usr/local/bin/coraenv

LINUX平台
rm -rf /etc/init.d/init.ohasd
rm -rf /etc/init.d/ohasd
rm -rf /etc/init.d/init.tfa

由于平台的不同,生成的名字也不同,不过我们可以使用下面的find命令来实现,先确认一下文件
find /etc -regex “.*\(crs\|ohasd\|tfa\|oracle-tfa.conf\|oracle-ohasd.conf\)”

如果没有问题就可以直接mv或者rm了
find /etc -regex “.*\(crs\|ohasd\|tfa\|tfa.conf\|ohasd.conf\)” -exec mv {} /tmp \;
–rhel 66
rm -rf /etc/init/oracle-tfa.conf
rm -rf /etc/init/oracle-ohasd.conf
rm -rf /etc/oracle/setasmgid
rm -rf /etc/oracle/lastgasp
rm -rf /etc/oracle/oprocd
rm -rf /etc/oracle/scls_scr
rm -rf /etc/oracle/ocr.loc
rm -rf /etc/oracle/olr.loc
–rhel 66
rm -rf /etc/rc.d/init.d/ohasd
rm -rf /etc/rc.d/rc6.d/K15ohasd
rm -rf /etc/rc.d/rc3.d/S96ohasd
rm -rf /etc/rc.d/rc5.d/S96ohasd
rm -rf /etc/rc.d/rc0.d/K15ohasd
rm -rf /etc/rc.d/rc2.d/K15ohasd
rm -rf /etc/rc.d/rc1.d/K15ohasd
–rhel58
rm -rf /etc/inittab
cp /etc/inittab.no_crs /etc/inittab
rm -rf /etc/rc.d/rc3.d/S96ohasd
rm -rf /etc/rc.d/rc3.d/K15ohasd
rm -rf /etc/rc.d/rc2.d/K15ohasd
rm -rf /etc/rc.d/rc4.d/K15ohasd
rm -rf /etc/rc.d/rc1.d/K15ohasd
rm -rf /etc/rc.d/rc6.d/K15ohasd
rm -rf /etc/rc.d/rc0.d/K15ohasd
rm -rf /etc/rc.d/rc5.d/S96ohasd
rm -rf /etc/rc.d/init.d/init.ohasd
rm -rf /etc/rc.d/init.d/ohasd

下面是ORACLE ASM
— /etc/rc.d/init.d/oracleasm
— /usr/lib/oracleasm
— /opt/oracle/extapi/64/asm/orcl/1/libasm.so

下面是一下临时文件
rm -rf /tmp/.oracle
rm -rf /tmp/ora*
rm -rf /var/tmp/.oracle
rm -rf /tmp/CVU*
rm -rf /tmp/Ora*
— rm -rf /etc/oratab
— rm -http://www.oracleplus.netrf /etc/oraIn*
— rm -rf /etc/oracle*
— rm -rf /etc/ora*

HP_UNIX
rm /sbin/init.d/init.ohasd
rm /sbin/init.d/ohasd
rm /etc/inittab
cp /etc/inittab.no_tfa /etc/inittab
rm -rf /var/opt/oracle/setasmgid
rm -rf /var/opt/oracle/lastgasp
rm -rf /var/opt/oracle/oprocd
rm -rf /var/opt/oracle/scls_scr
rm -rf /var/opt/oracle/ocr.loc
rm -rf /var/opt/oracle/olr.loc
rm -rf /sbin/rc2.d/K960init.crs
rm -rf /sbin/rc2.d/K001init.crs
rm -rf /sbin/rc3.d/K960init.crs
rm -rf /sbin/rc3.d/S960init.crs
rm -rf /var/opt/oracle/oratab
rm -rf /tmp/.oracle
rm -rf /tmp/ora*
rm -rf /var/tmp/.oracle
rm -rf /tmp/CVU*
rm -rf /tmp/Ora*
— rm -rf /etc/oratab
— rm -rf /etc/oraIn*
— rm -rf /etc/oracle*
— rm -rf /etc/ora*
— rm -rf /var/opt/oracle*

删除软件
cd /u01
rm -rf app
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app
chmod -R 775 /u01/app
chown oracle:oinstall /u01/app/oracle

如果这些使用ASM,需要dd 磁盘头的信息
dd if=/dev/zero of=/dev/rdsk/V1064_vote_01_20m.dbf bs=1M count=256
dd if=/dev/zero of=/dev/rdsk/ocrV1064_100m.ora bs=1M count=256
— rm -rf /bill/ocrvote01/bill*
— rm -rf /bill/ocrvote02/bill*
— rm -rf /bill/ocrvote03/bill*
— chown -R grid:oinstall /bill
— chmod -R 775 /bill
本文固定链接: http://www.htz.pw/2015/05/11/%e6%89%8b%e5%8a%a8%e5%88%a0%e9%99%a4grid%e8%bd%af%e4%bb%b6.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【学习笔记】Oracle不同操作系统手动卸载数据库Grid软件和ASM软件

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1191.html

Oracle研究中心

关键词:

Linux

aix

hp-unux

如何手动卸载删除Oracle数据库