How to manually clean delete Oracle database on Linux ___ Big Data

Source: Internet
Author: User

In a recent Oracle database experiment with a VMware virtual machine, we all know that on Windows I can go to add a removal program to automatically delete all installed applications, but there is no such service on Linux that can be automatically deleted. So I tried to move the Oracle database to delete it. The specific steps are as follows:

1, check the oracle_sid,oracle_home first. Oracle_base Information:

[Oracle@vmoel5u4 dbs]$ Echo $ORACLE _sid
PROD
[Oracle@vmoel5u4 dbs]$ Echo $ORACLE _home
/u01/app/oracle/product/10.2.0/db_1
[Oracle@vmoel5u4 dbs]$ Echo $ORACLE _base
/u01/app/oracle

2, enter the Oracle_base directory to remove the relevant directories for installing Oracle Database information:

The following Admin,flash_recovery_area,fra,oradata directory is installed on the Oracle database after the corresponding directory, we can all remove it. Where the product directory is an Oracle database installer file that cannot be deleted, we need this installation file to install the database, which is equivalent to the executable file of Oracle EXE installed under Windows System.

[Oracle@vmoel5u4 ~]$ CD $ORACLE _base
[Oracle@vmoel5u4 oracle]$ LL
Total 20
Drwxr-x---3 oracle oinstall 4096 18:12 Admin
Drwxr-xr-x 3 Oracle Oinstall 4096 Nov 19:34
Drwxr-xr-x 2 Oracle Oinstall 4096 Nov 18:11 FRA
Drwxr-xr-x 3 Oracle Oinstall 4096 Nov 18:51
DRWXRWX---3 Oracle oinstall 4096 (MAR) product


[Oracle@vmoel5u4 oracle]$ RM-RF Admin

[Oracle@vmoel5u4 oracle]$ rm-rf Flash_recovery_area FRA

[Oracle@vmoel5u4 oracle]$ RM-RF Oradata

3, I also need to remove the agent10g directory because I have the agent10g of grid control deployed on this server.

[Oracle@vmoel5u4 oracle]$ CD product/
[Oracle@vmoel5u4 product]$ LL
Total 4
DRWXRWX---4 oracle oinstall 4096 Nov 17 23:35 10.2.0
[Oracle@vmoel5u4 product]$ CD 10.2.0/
[Oracle@vmoel5u4 10.2.0]$ LL
Total 8
Drwxr-xr-x Oracle Oinstall 4096 Nov 19:41 agent10g
Drwxr-x---oracle oinstall 4096 Nov 18:13 db_1
[Oracle@vmoel5u4 10.2.0]$ pwd
/u01/app/oracle/product/10.2.0
[Oracle@vmoel5u4 10.2.0]$ RM-RF agent10g/

4, so far, Oracle-related data files have been deleted.
[Oracle@vmoel5u4 10.2.0]$ LL
Total 4
Drwxr-x---oracle oinstall 4096 Nov 18:13 db_1

5, we delete the Oracle database parameter files, password files and snapshot files

[Oracle@vmoel5u4 db_1]$ CD $ORACLE _home/dbs
[Oracle@vmoel5u4 dbs]$ LL
Total 6956
-RW-RW----1 Oracle oinstall 1544 Nov 18:58 Hc_prod.dat
-RW-R-----1 Oracle Oinstall 12920 May 3 2001 Initdw.ora
-RW-R-----1 Oracle Oinstall 8385 SEP 1998 Init.ora
-rw-r--r--1 Oracle Oinstall 318 Nov 18:57
-RW-RW----1 Oracle oinstall Nov 18:59 Lkprod
-RW-R-----1 Oracle Oinstall 1536 Nov 23:59 Orapwprod
-RW-R-----1 Oracle oinstall 7061504 Nov 22:30 SNAPCF_PROD.F
-RW-R-----1 Oracle oinstall 2560 Nov 19:35 Spfileprod.ora
[Oracle@vmoel5u4 dbs]$


[Oracle@vmoel5u4 ~]$ CD $ORACLE _home/dbs
[Oracle@vmoel5u4 dbs]$ LL
Total 6956
-RW-RW----1 Oracle oinstall 1544 Nov 18:58 Hc_prod.dat
-RW-R-----1 Oracle Oinstall 12920 May 3 2001 Initdw.ora
-RW-R-----1 Oracle Oinstall 8385 SEP 1998 Init.ora
-rw-r--r--1 Oracle Oinstall 318 Nov 18:57
-RW-RW----1 Oracle oinstall Nov 18:59 Lkprod
-RW-R-----1 Oracle Oinstall 1536 Nov 23:59 Orapwprod
-RW-R-----1 Oracle oinstall 7061504 Nov 22:30 SNAPCF_PROD.F
-RW-R-----1 Oracle oinstall 2560 Nov 19:35 Spfileprod.ora
[Oracle@vmoel5u4 dbs]$ rm-rf hc_prod.dat initprod.ora lkprod orapwprod SNAPCF_PROD.F SpfilePROD.ora
[Oracle@vmoel5u4 dbs]$ LL
Total 28
-RW-R-----1 Oracle Oinstall 12920 May 3 2001 Initdw.ora
-RW-R-----1 Oracle Oinstall 8385 SEP 1998 Init.ora

6, delete listener files and tnsnames files

[Oracle@vmoel5u4 admin]$ CD $ORACLE _home/network/admin
[Oracle@vmoel5u4 admin]$ LL
Total 12
-rw-r--r--1 Oracle oinstall 419 Nov 19:59
Drwxr-x---2 oracle oinstall 4096-Mar samples
-rw-r--r--1 Oracle oinstall 541 Nov 19:39
[Oracle@vmoel5u4 admin]$ rm-rf Listener.ora Tnsnames.ora
[Oracle@vmoel5u4 admin]$ LL
Total 4
Drwxr-x---2 oracle oinstall 4096-Mar samples

7, you can also check the/etc/oratab/etc/inittab/u01/app/orainventory/contentxml/inventory.xml file to see if there are any unnecessary entries (entries) Information to delete or modify it.

With the 7 steps above, you can basically remove an Oracle database from Linux.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.