Linux平台上手动卸载Oracle数据库

06-28

系统环境:

Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0

步骤如下:

1.停止所有Oracle进程

$ sqlplus / as sysdba

//for asm instance

$ sqlplus / as sysasm

SQL> shutdonw immediate

$ lsnrctl stop

2.删除Oracle安装目录

# rm -rf /u01/app

3.删除相关的用户和用户组

# userdel -r oracle

# groupdel oinstall

# groupdel dba

# groupdel oper

//for asm instance

# userdel -r grid

# groupdel asmadmin

# groupdel asmdba

# groupdel asmoper

4.删除相关配置文件

# rm -rf /etc/oratab

# rm -rf /etc/oraInst.loc

# rm -rf /etc/oracle

//for grid RAC

# rm -rf /etc/init.d/init.ohasd

//for grid RAC

# rm -rf /usr/local/bin/dbhome

# rm -rf /usr/local/bin/oraenv

# rm -rf /usr/local/bin/coraenv