Hurry UP! Drop database efficiently and effectively – SQL> Drop database;

Oracle 10g allows us to drop database quickly. It takes care of all files listed in controlfile: datafile, redo logs, controlfile and spfile if it is there. Well we have to clean up archivelogs and backup. Fine enough. Got be extremely careful do this way only after approval, obviously.

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

Total System Global Area  314572800 bytes
Fixed Size                  2029816 bytes
Variable Size             197134088 bytes
Database Buffers          113246208 bytes
Redo Buffers                2162688 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit

Advertisements

About Pang

Oracle DBA working in database, fusion middleware and identity management and cloud.
This entry was posted in Oracle database. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s