I want to delete oracle and reinstall it..

i want to delete oracle and reinstall it..
i know how to install it but no idea how to delete it...

u can also use oracle DBCA to delete database!
Otherwise check this one:
--1--LOGON AS SYSDBA
sqlplus / as sysdba;
--2--Check oracle related files. You can create a .sh file that removes all files as i mentioned below.
Please be careful when executing commands.
Some of them may be directory instead of file.You can use rmdir command instead.
Set serveroutput on
DECLARE
TYPE string_arr IS TABLE OF VARCHAR2(1024);
file_list string_arr;
BEGIN
SELECT t.file_path BULK COLLECT
INTO file_list
FROM(SELECT NAME file_path FROM V$DATAFILE
UNION
SELECT MEMBER file_path FROM V$LOGFILE
UNION
SELECT NAME file_path FROM v$controlfile
UNION
SELECT VALUE file_path FROM v$parameter WHERE NAME LIKE '%dest'
UNION
SELECT VALUE file_path FROM v$parameter2 WHERE NAME = 'utl_file_dir'
UNION
SELECT '$ORACLE_BASE/admin/$ORACLE_SID' file_path FROM dual) t;
FOR i IN file_list.FIRST .. file_list.LAST LOOP
DBMS_OUTPUT.PUT_LINE('rm -f ' || file_list(i));
END LOOP;
END;
--3--after u save the output of the above script, Shutdown database
shutdown immediate
--4--Remove all data files as outputted above using rm -r
--5--Remove entry in tnsnames.ora
vi $ORACLE_HOME/network/admin/tnsnames.ora
--6--Remove entry in listener.ora
vi $ORACLE_HOME/network/admin/listener.ora
--7-- Remove entry in oratab
vi /etc/oratab
cheers!!!!!

Similar Messages

Maybe you are looking for