1使用SQL*PLUS停止数据库
1.1停止实例
[oracle@standby1 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on星期三6月11 17:53:02 2008
Copyright (c) 1982, 2005, oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
1.2停止Listener
[oracle@standby1 ~]$ lsnrctl stop
2删除文件(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.cssd: No such file or directory
(路径/app/oracle/是我的$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.cssd
[root@standby1 ~]# rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
(其中/app/oracle是我的$ORACLE_BASE,/oradata/存放了oracle数据。)
3删除用户与用户组
3.1删除oracle用户(若要重新安装,可以不删除)
[root@standby1 ~]# userdel -r oracle
3.2删除用户组 (若要重新安装,可以不删除)
[root@standby1 ~]# groupdel oinstall
[root@standby1 ~]# groupdel dba
4删除对应的服务
[root@ora920 /root]# chkconfig --del oracle
select userenv('language') from dual;