How to manually delete an Oracle 11g database in Linux
The following steps teach you how to manually delete an Oracle 11g Database in a Linux environment.
I installed the Oralce 11G database on CentOS 6.
Use SQLPlus or other command line tools you like to log on to the database. The login user isSysdba*
Enter the following command to different file paths:
- Select name from v $ datafile;
- Select member from v $ logfile;
- Select name from v $ controlfile;
- Select name from v $ tempfile;
In SQLClose the database in Plus, and then exit SQLPlus
- Sqlplus "/as sysdba"
- Shutdown immediate;
- Quit;
Enter the following command in the command line to stop the listening service:
In the Oralce Linux Account:
- Lsnrctl stop
Recall the previous file path as an check item when deleting these files. Remember: Have you backed up the database? When you are ready, delete your data files, as well as your log files, control files, and temporary files.
- Go to the $ ORACLE_HOME/network/admin directory and delete the tnsnames. ora and listener. ora files;
- Go to the $ ORACLE_HOME/dbs directory and delete the init [db_name]. ora, orapw [db_name], and spfile [db_name]. ora files;
- Go to $ ORACLEHOME/admin/[dbName]/pfile directory and delete the init [db_name]. ora file;
- Go to $ ORACLEHOME/admin/[dbName]/adump directory and delete all files;
- Edit/etc/oratab and remove the rows starting with your database name.
That's all.
Delete an Oracle database in a Linux operating system
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
Install Oracle 11.2.0.4 x64 in Oracle Linux 6.5