drop database command in oracle

Introduction: –

 
drop database command in oracle
drop database command in oracle

 
Steps to remove oracle database in Oracle |. Suppose we have requirement to drop entire oracle
 
database if we are planning to refresh test or development database instance, to fulfill the
 
requirement we must drop/delete/remove the database. There are several ways to remove database. We
 
will discuss here using CLI to delete oracle database instance.
 
 

Drop database command in oracle.

 
Below are steps to delete oracle database instance.  We will aware how to delete oracle instance.
 
Check the database status.
 
SQL> select name,open_mode from v$database;
 
NAME      OPEN_MODE
——— ——————–
PHASE1    READ WRITE
 
Shutdown if database in open mode.
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
 
Here introducing two ways to mount database in exclusive/restricted mode.
 
Execute ‘alter system enable restricted session‘, if database in mount mode.
 
SQL> startup mount
ORACLE instance started.
 
Total System Global Area 6413680640 bytes
Fixed Size                  2265224 bytes
Variable Size             805310328 bytes
Database Buffers         5586812928 bytes
Redo Buffers               19292160 bytes
Database mounted.
 
 
 
SQL> alter system enable restricted session;
 
System altered.
 
 
Execute ‘startup mount exclusive restrict‘, if database already shutdown.
 
 
SQL> startup mount exclusive restrict;
ORACLE instance started.
 
Total System Global Area 6413680640 bytes
Fixed Size                  2265224 bytes
Variable Size             805310328 bytes
Database Buffers         5586812928 bytes
Redo Buffers               19292160 bytes
Database mounted.
 
After that run drop database command on sql prompt to remove the oracle database.
 
 
SQL>drop database ;
 
 

Leave a Comment