1. Delete database and datafiles:--------------------------------
$ lsnrctl stop
$ sqlplus '/as sysdba'
SQL> select * from v$controlfile;
SQL> select * from v$dbfile;
SQL> select * from v$logfile;
SQL> archive log list;
SQL> shutdown abort;
SQL> startup mount exclusive restrict;
SQL> drop database; //Delete ctl. dbf, log and flashback automatically
SQL> exit
$ rm -rf $ORACLE_BASE/admin/$ORACLE_SID
$ rm -rf /orahome/oradata/$ORACLE_SID
$ rm -rf /orahome/arch1/$ORACLE_SID
$ rm -rf /orahome/flash_recovery_area/$ORACLE_SID
$ rm $ORACLE_HOME/dbs/*$ORACLE_SID* //Delete password file
$ rm $TNS_ADMIN/*.ora //Delete listener.ora、tnsnames.ora and sqlnet.ora
or
$ rm $ORACLE_HOME/network/admin/*.ora
$ e /etc/oratab //Delete instance name
$ e ~/.bash_profile //Delete instance setup
2. Uninstall Oracle
-------------------
2.1 $ rm -rf oraInventory //the location of oraInventory is recorded in /etc/oraIns.loc
2.2 $ rm -rf $ORACLE_HOME
2.3 $ rm -f below:
/usr/local/bin/oraenv
/usr/local/bin/coraenv
/usr/local/bin/dbhome
/etc/oraInst.loc
/etc/oratab
/var/tmp/.oracle
阅读(734) | 评论(0) | 转发(0) |