1. Use SQL * Plus to stop a database
1.1 stop an instance
[Oracle @ standby1 ~] $ Sqlplus/nolog
SQL * Plus: Release 10.2.0.1.0-production on Wednesday June 11 17:53:02 2008
Copyright (c) 1982,200 5, Oracle. All rights reserved.
SQL> Conn/As sysdba
Connected.
SQL> Shutdown
Database closed.
Database dismounted.
Oracle instance shut down.
SQL> exit
1.2 stop listener
[Oracle @ standby1 ~] $ LSNRCTL stop
2. delete the file (run as root)
/APP/Oracle/product/10.2.1/db_1/bin/localconfig Delete
[Root @ standby1 ~] #/APP/Oracle/product/10.2.0/DB/bin/localconfig Delete
/Etc/Oracle does not exist. Creating it now.
/APP/Oracle/product/10.2.0/DB/bin/localconfig: Line 715:/etc/init. d/init.css D: no such file or directory
(Path/APP/Oracle/is my $ ORACLE_HOME)
[Root @ standby1 ~] # Rm-RF/APP/Oracle /*
[Root @ standby1 ~] # Rm-RF/oradata /*
[Root @ standby1 ~] # Rm-F/etc/orainst. Loc/etc/oratab
[Root @ standby1 ~] # Rm-RF/etc/Oracle
[Root @ standby1 ~] # Rm-F/etc/inittab.css d
[Root @ standby1 ~] # Rm-F/usr/local/bin/coraenv/usr/local/bin/dbhome/usr/local/bin/oraenv
(Here,/APP/oracle is my $ oracle_base and/oradata/Stores ORACLE data .)
3. delete users and user groups
3.1 delete an oracle user (to reinstall it, Do not delete it)
[Root @ standby1 ~] # Userdel-r Oracle
3.2 delete a user group (if you want to reinstall the user group, do not delete it)
[Root @ standby1 ~] # Groupdel oinstall
[Root @ standby1 ~] # Groupdel DBA
4. Delete the corresponding service
[Root @ ora920/root] # chkconfig -- del Oracle
Select userenv ('language') from dual;