1.停库
[oracle@jeames ~]$ sqlplus / as sysdba SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
2.停监听
[oracle@jeames ~]$ lsnrctl stop
3.停HTTP服务
[root@jeames ~]# service httpd stop
4.用su或重新登录到root(如果重新安装可以保留oracle用户)
5.删除安装目录
[root@jeames ~]# rm -rf /u01/app/oracle/
[root@jeames ~]# rm -rf /u01/app/oraInventory/
6.删除/usr/bin下文件
[root@jeames ~]# rm -rf /usr/local/bin/dbhome
[root@jeames ~]# rm -rf /usr/local/bin/oraenv
[root@jeames ~]# rm -rf /usr/local/bin/coraenv
7.删除/etc/oratab
[root@jeames ~]# rm /etc/oratab
8.删除/etc/oraInst.loc
[root@jeames ~]# rm /etc/oraInst.loc
9.删除oracle用户(若要重新安装,可以不删除)
[root@jeames ~]# userdel -r oracle
10.删除用户组(若要重新安装,可以不删除)
[root@jeames ~]# groupdel oinstall
[root@jeames ~]# groupdel dba
11.删除启动服务
[root@jeames ~]# chkconfig
到此为止重启后,Linux系统下Oracle数据库已完全删除
本文如有错误或不完善的地方请大家多多指正,您的批评指正是我写作的最大动力!