![]() |
| Drop oracle Database |
Steps to remove oracle database in Oracle | . Suppose we have requirement to drop entire oracle database if we are planing to refresh test or development database instance, To fulfill the requirement we must drop/delete/remove the database. There are several way to remove database. We will discuss here using CLI to delete oracle database instance.
Below are steps to delete oracle database instance. We will aware how to delete oracle instance.
Check the database status.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
PHASE1 READ WRITE
Shutdown if database in open mode.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
Here introducing two way to mount database in exclusive/restricted mode.
Execute 'alter system enable restricted session' , if database in mount mode.
SQL> startup mount
ORACLE instance started.
Total System Global Area 6413680640 bytes
Fixed Size 2265224 bytes
Variable Size 805310328 bytes
Database Buffers 5586812928 bytes
Redo Buffers 19292160 bytes
Database mounted.
SQL> alter system enable restricted session;
System altered.
Execute 'startup mount exclusive restrict' , if database already shutdown.
SQL> startup mount exclusive restrict;
ORACLE instance started.
Total System Global Area 6413680640 bytes
Fixed Size 2265224 bytes
Variable Size 805310328 bytes
Database Buffers 5586812928 bytes
Redo Buffers 19292160 bytes
Database mounted.
After that run drop database command on sql prompt to remove the oracle database.
SQL>drop database;

No comments:
Post a Comment
Thanks for reading till end. I hope this will help you more to improve your knowledge.
Now it's your turn!
What do you think? Share your experience in the comments box and subscribe for more interesting post.