1.停庫[oracle@testdb ~]$ sqlplus / as sysdbaSQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> exit 2.停監聽[oracle@ ...
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資料庫已完全刪除