How to drop an Oracle database using SQL Plus commands

How to drop an Oracle database using SQL Plus commands:

  • 1- Setup your Oracle SID
  • In this example my database SID is DB01.

    export ORACLE_SID=DB01
  • Shutdown the database:
  • SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down
    SQL>
  • Start up your database in mount - exclusive - restrict mode:
  • SQL> startup mount exclusive restrict;
    ORACLE instance started.
    Total System Global Area  524288000
    bytesFixed Size                  2097592
    bytesVariable Size             142609992
    bytesDatabase Buffers          373293056
    bytesRedo Buffers                6287360
    
    Database mounted.
  • Now issue the  drop database command.
  • SQL>  drop database;
    Database dropped.

    During the drop database command your data files and control files will be erased from your operation system.