Tuesday, April 18, 2017

Drop an Oracle Database

To drop an Oracle Database.

You need to connect database as SYSDBA.

SQL> set pages 1000
SQL> set lines 1000
SQL>
SQL> select INSTANCE_NAME,HOST_NAME from  v$instance;

INSTANCE_NAME    HOST_NAME
---------------- ----------------------------------------------------------------
ASHISH           Hostname.domain.com

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>
SQL> startup mount exclusive restrict;
ORACLE instance started.

Total System Global Area 4275781632 bytes
Fixed Size                  2260088 bytes
Variable Size            2415920008 bytes
Database Buffers         1845493760 bytes
Redo Buffers               12107776 bytes
Database mounted.
SQL>

SQL> select instance_name,host_name from v$instance;

INSTANCE_NAME    HOST_NAME
---------------- ----------------------------------------------------------------
ASHISH           Hostname.domain.com

SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
SQL>
SQL> exit


Good Luck