Permanently delete oracle from Centos

Source: Internet
Author: User

The following is an example of 9.0.4
1. log on with an oracle user
If you want to install it again, you 'd better back up the data first.
The script includes the user's login script, the script for automatic database startup and shutdown, and the script for automatic Listener startup.
If it is possible to save the script for creating a database

2. Use SQL * PLUS to stop a database
[Oracle @ ora920 oracle] $ sqlplus/nolog
SQL> connect/as sysdba
SQL> shutdown [immediate]
SQL> exit

3. Stop Listener
[Oracle @ ora920 oracle] $ lsnrctl stop

4. Stop the HTTP service
[Oracle @ ora920 oracle] $ ORACLE_HOME/Apache/bin/apachectl stop

5. Use su or log on to the root again (if you want to reinstall it, You can retain the oracle user, saving you the need to enter environment variables)

6. Delete the installation directory
[Root @ ora920/root] # rm-rf/opt/oracle/

7. delete files under/usr/bin
[Root @ ora920/root] # rm/usr/bin/dbhome
[Root @ ora920/root] # rm/usr/bin/oraenv
[Root @ ora920/root] # rm/usr/bin/coraenv

8. delete/etc/oratab
[Root @ ora920/root] # rm/etc/oratab

9. delete/etc/oraInst. loc
[Root @ ora920/root] # rm/etc/oraInst. loc

10. Delete the oracle user (to reinstall, do not delete it)
[Root @ ora920/root] # userdel-r oracle

11. Delete the user group (to reinstall it, Do not delete it)
[Root @ ora920/root] # groupdel oinstall
[Root @ ora920/root] # groupdel dba

12. Delete the startup Service
[Root @ ora920/root] # chkconfig -- del dbora

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.