1.停库
[oracle@testdb ~]$ sqlplus / as sysdba SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit
2.停监听
[oracle@testdb ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-DEC-2016 14:44:52 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb)(PORT=1521))) The command completed successfully
3.停HTTP服务
[root@testdb ~]# service httpd stop Stopping httpd: [ OK ]
4.用su或重新登录到root(如果重新安装可以保留oracle用户)
5.删除安装目录
[root@testdb ~]# rm -rf /u01/app/oracle/ [root@testdb ~]# rm -rf /u01/app/oraInventory/
6.删除/usr/bin下文件
[root@testdb ~]# rm -rf /usr/local/bin/dbhome [root@testdb ~]# rm -rf /usr/local/bin/oraenv [root@testdb ~]# rm -rf /usr/local/bin/coraenv
7.删除/etc/oratab
[root@testdb ~]# rm /etc/oratab
8.删除/etc/oraInst.loc
[root@testdb ~]# rm /etc/oraInst.loc
9.删除oracle用户(若要重新安装,可以不删除)
[root@testdb ~]# userdel -r oracle
10.删除用户组(若要重新安装,可以不删除)
[root@testdb ~]# groupdel oinstall [root@testdb ~]# groupdel dba
11.删除启动服务
[root@testdb ~]# chkconfig
到此为止重启后,linux系统下Oracle数据库已完全删除
总结
以上所述是小编给大家介绍的linux环境下卸载oracle 11g的方法,大家如有疑问可以留言,或者联系站长。感谢亲们支持!!!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!