How to drop oracle database manually


In this article we will show how to manually drop/delete oracle database
Here we will drop oracle database which name TESTDB

Step 1: First we check the oracle_sid and oracle_home using below command

#echo $ORACLE_SID
# echo $ORACLE_HOME

@Check the oracle database name
Sql> select name from v$database;


Step 2: We check the location of data file, log file and control file of drop database so that after drop database we can check that location files are exit or not.  

# Check log file location
Sql>select member from v$logfile;                         
# Check control files location
 Sql>select name from v$controlfile;
# Check data file location
Sql>select name from v$datafile;


Step 3: Connect oracle database as sysdba

#sqlplus / as sysdba
Shutdown the database
Sql> shutdown immediate
Or
Sql> shutdown abort


Step 4: startup oracle database exclusive restrict mode

Sql> startup mount exclusive restrict;


Step 5: drop database using drop command

Sql> drop database


Note: Be careful to drop database, make sure your database name is correct which database you want to drop.

After database drop we can check the data file, control file and log file location to verify that all files are removed successfully.

Done!

Post a Comment

0 Comments

3