Remove Oracle database instance under Linux

Source: Internet
Author: User

1. Stop Service

First lsnrctl stop with command

And then run

Sqlplus/nolog

Sql> Conn/as SYSDBA

sql> shutdown


2, view the instance process and delete

Find $ORACLE _base/-name $ORACLE _sid

/mnt/installer/oracle/flash_recovery_area/orcl
/mnt/installer/oracle/oradata/orcl
/mnt/installer/oracle/diag/rdbms/orcl
/mnt/installer/oracle/diag/rdbms/orcl/orcl
/mnt/installer/oracle/admin/orcl
/mnt/installer/oracle/cfgtoollogs/dbca/orcl

[Oracle@rt1d20/]$ rm-rf/mnt/installer/oracle/flash_recovery_area/orcl/
[Oracle@rt1d20/]$ rm-rf/mnt/installer/oracle/oradata/orcl/
[Oracle@rt1d20/]$ rm-rf/mnt/installer/oracle/diag/rdbms/orcl/
[Oracle@rt1d20/]$ rm-rf/mnt/installer/oracle/admin/orcl/
[Oracle@rt1d20/]$ rm-rf/mnt/installer/oracle/cfgtoollogs/dbca/orcl/


Find $ORACLE _base/*-name ' *[bb][tt][ss][dd][bb]2* ' | Grep-v admin| Grep-v Oradata

Skip if not

$ CD mnt/installer/oracle/

$ ll

Drwxr-x---2 oracle oinstall 4096 8 16:50 Admin
Drwxr-xr-x 4 Oracle Oinstall 4096 7 23:12 cfgtoollogs
Drwxr-xr-x 2 Oracle Oinstall 4096 7 23:15 checkpoints
Drwxrwxr-x 4 Oracle Oinstall 4096 7 23:12 diag
Drwxr-x---3 oracle oinstall 4096 8 16:49 Flash_recovery_area
Drwxr-x---2 oracle oinstall 4096 8 16:49 Oradata
DRWXRWX---5 oracle oinstall 4096 7 21:06 orainventory
Drwxr-xr-x 3 Oracle Oinstall 4096 7 21:03 product


[Oracle@rt1d20 oracle]$ RM-RF admin/
[Oracle@rt1d20 oracle]$ RM-RF flash_recovery_area/
[Oracle@rt1d20 oracle]$ RM-RF oradata/

3, delete the old instance configuration items

VI Etc/oratab

Delete last line: Orcl:/mnt/installer/oracle/product/11.2.0/db_1:n


Finally silently reinstall the database instance

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.