In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Thursday, May 31, 2012

Drop Database Command Demo

From 10g onwards, we have Drop Database command, that made a fast and efficient cleanup of all datafiles, redologs and control files in one command.

Drop database do require to mount the database in exclusive restricted mode.

The steps are as follows:

•shutdown abort;

•startup mount exclusive restrict;

•drop database;

Here is a Demo:-
$ . oraenv

ORACLE_SID = [oracle] ? miadev07

The Oracle base for ORACLE_HOME=/u01/app/oracle/product/ is /u01/app/oracle/product/

dev07: /home/oracle

$ sqlplus / as sysdba

SQL*Plus: Release - Production on Wed May 30 18:46:37 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount exclusive restrict;

ORACLE instance started.

Total System Global Area 1073741824 bytes

Fixed Size 2089472 bytes

Variable Size 390073856 bytes

Database Buffers 675282944 bytes

Redo Buffers 6295552 bytes

Database mounted.

SQL> select name from v$datafile;







SQL> select member from v$logfile;






SQL> select name from v$controlfile;




SQL> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit

Check Datafile/Redologs/Controlfile after drop database in ASM/File system. it will not available.
Rajesh Kumar Govindarajan.


Aka Baka said...

Properly operate computer & do Computer Solusion having good knowledge about computer science.

Anonymous said...

Thanks for sharing the info.

A dofollow forum.
Oracle Forum