Wednesday, October 29, 2008

Dropping a Database in 10G

Dropping a Database in 10G Consists of the following steps.

echo $ORACLE_SID
sqlplus "/as sysdba"
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1077936128 bytes
Fixed Size 2034344 bytes
Variable Size 427824472 bytes
Database Buffers 633339904 bytes
Redo Buffers 14737408 bytes
SQL> alter database mount exclusive;

Database altered.

SQL> alter system enable restricted session;

System altered.

SQL> select name from v$database;

NAME
---------
TEST
SQL> drop database;

Database dropped.

Database is dropped & all related files are deleted automatically.

Please be very cautious while using this syntax in multidatabase environment.

No comments: