Operating System - HP-UX
1748180 Members
4188 Online
108759 Solutions
New Discussion юеВ

Erase an Oracle 8.1.7 instance

 
Chartier Jerome
Frequent Advisor

Erase an Oracle 8.1.7 instance

Hello,

What is the procedure to erase an Oracle 8.1.7 instance (drop tables, truncate,.....????).

Thanks in advance for your help

Regards

J??r??me
J@Y
2 REPLIES 2
T G Manikandan
Honored Contributor

Re: Erase an Oracle 8.1.7 instance

If you want to delete/drop/remove a database
do the steps below

check your ORACLE_SID and ORACLE_HOME.
Make sure that you are pointing the right ORACLE_SID

01. $svrmgrl
02. startup the database if it's not already started. The database must at least mounted.
svrmgrl>startup mount
03. spool /databasefiles.lst
svrmgrl>spool databasefiles.lst
04. select name from v$datafile; (This will get all the datafiles; alternatively, you can select file_name from dba_data_files)
svrmgrl>select name from v$datafile;
05. select member from v$logfile;
svrmgrl>select * from v$logfile;
06. select name from v$controlfile;
svrmgrl>select * from v$controlfile;
07. archive log list (archive_log_dest is where the archived destination is)
svrmgrl>archive log list;
Go to the destination directory of archive_log_dest parameter and remove all the files.
08. locating ifile by issuing show parameter ifile (alternatively, check the content of init.ora)
09. spool off
svrmgrl>spool off
10. Delete in O/S level the files listed in databasefiles.lst
11. remove all the entries which refer to the deleted database in tnsnames.ora and listener.ora (located in $ORACLE_HOME/network/admin)
12. remove all database links referring to the deleted database.
13. check "/var/opt/oracle/oratab" to make sure there is no entry of the database deleted. If yes, remove it.

Thanks
Andreas D. Skjervold
Honored Contributor

Re: Erase an Oracle 8.1.7 instance

Hi

would add:
13. /etc/oratab for HP-UX systems

14. remove $ORACLE_HOME/dbs/init.oralink and orapw if present.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!