1. Log in with an Oracle user
If you want to install again, it's best to do some backup work first.
Includes the user's logon script, the database automatically starts the closed script, and the listener automatically starts the script.
If possible, even the script that created the database is saved.
2. Stop the database using Sql*plus
[Email protected] oracle]$ Sqlplus/nolog
Sql> Connect/as SYSDBA
sql> shutdown Immediate
Sql> exit
3. Stop Listener
[[email protected] oracle]$ Lsnrctl stop
4. Use Su or log back in to root (if you want to reinstall the Oracle user, save the environment variable)
5. Remove the installation directory
[Email protected] ~]# rm-rf/opt/oracle/
6. Delete the file under/usr/bin
[Email protected] ~]# Rm/usr/local/bin/dbhome
[Email protected] ~]# rm/usr/local/bin/oraenv
[Email protected] ~]# rm/usr/local/bin/coraenv
7. Delete the/etc/oratab
[Email protected] ~]# Rm/etc/oratab
8. Delete the/etc/orainst.loc
[Email protected] ~]# Rm/etc/orainst.loc
9. Remove the Oracle User (to reinstall, do not delete)
[Email protected] ~]# Userdel–r Oracle
10. Delete the user group (to reinstall it, you can not delete it)
[Email protected] ~]# Groupdel Oinstall
[[email protected] ~]# Groupdel DBA
10. Reinstall prompt SID already exists
Comment out under/etc/oratab
ORACLE Single Instance full unload database