oracle 11g unloading operations in the linux environment

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/leo__1990/article/details/91488758

1. Stop the database using SQL * PLUS

[oracle@dg2 ~]$ sqlplus log
SQL> connect / as sysdba
SQL> shutdown immediate
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit

2. Stop listening listener

[oracle@dg2 ~]$ 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=dg1)(PORT=1521)))
The command completed successfully

3. Stop the HTTP service

[root@dg2 ~]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@dg2 ~]#

4. su to root or log in again (re-install if the user can keep oracle)

5. The installation directory delete

[root@dg2 ~]# rm -rf /u01/app/oracle/
[root@dg2 ~]# rm -rf /u01/app/oraInventory/

6. files in / usr / bin deleted

[root@dg2 ~]# rm -rf /usr/local/bin/dbhome
[root@dg2 ~]# rm  -rf /usr/local/bin/oraenv
[root@dg2 ~]# rm -rf /usr/local/bin/coraenv

7. The / etc / oratab delete

[root@dg2 ~]# rm /etc/oratab

8. Delete /etc/oraInst.loc

[root@dg2 ~]# rm /etc/oraInst.loc

9. oracle user to delete (To reinstall, you can not delete)

[root@dg2 ~]# userdel -r oracle

10. The user group is deleted (To reinstall, you can not delete)

[root@dg2 ~]# groupdel oinstall
[root@dg2 ~]# groupdel dba

11. Start service delete

[root@dg2 ~]# chkconfig

So far after the restart, Oracle database on Linux system has been completely removed!

Guess you like

Origin blog.csdn.net/leo__1990/article/details/91488758