linux环境下卸载oracle 11g
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数据库已完全删除