Removal of Oracle Software and Database from Linux

Remove an Oracle RDBMS from a configured system can be performed in three steps: Removal of existing RDBMS, removal of Oracle binaries, and finally removal of Oracle system references.  This procedure demonstrates the execution of this process.

 

  1. Logon to Linux as oracle software owner:

 

 [root@mylinux ~]# su – oracle

[oracle@mylinux ~]$

 

  1. Execute the following DBCA command to remove the existing database, you will need to know the information:  ORACLE_SID, User with SYSDBA privileges, and SYSDBA password.

 

 [oracle@mylinux bin]$ dbca -silent  -deleteDatabase -sourceDB orcl -sysDBAUserName sys -sysDBAPassword xxxxxx

 

Connecting to database

4% complete

9% complete

14% complete

19% complete

23% complete

28% complete

47% complete

Updating network configuration files

52% complete

Deleting instance and datafiles

76% complete

100% complete

Look at the log file “/opt/app/oracle/cfgtoollogs/dbca/orcl1.log” for further details.

[oracle@mylinux bin]$

 

  1. Remove Oracle Home directory as the root user.

 

[root@mylinux oracle]# rm -rf /opt/app/oracle/orcl_db

[root@mylinux oracle]#

 

  1. Remove Oracle storage directories if they exist.

 

[root@mylinux u01]# cd /u01/oradata

[root@mylinux oradata]#

 

  1. Remove Oracle system references in the /etc directory

 

[oracle@mylinux ~]$ rm -rf /etc/*ora*

[oracle@mylinux ~]$

 

 

  1. Remove Oracle Inventory.

 

 

[root@mylinux app]# rm -rf /opt/app/inventory_location/

[root@mylinux app]#

 

  1. This completes removing oracle software from a Linux environment.

 

 

 

 

Larry Catt, OCP