Thursday 9 December 2021

How to drop a database in oracle?

 

This document describes how to drop a database in oracle. Please consider this post for only practice purpose on your won test instances and should not practice in any client's environment.

We may get the requirement to drop an existing test database as part of pre-clone steps. We should have proper approval from the management before drop the  database. Please make sure we are dropping test database. Below are the steps to drop a database.

Step 1: 

Take necessary backups before drop the database.

Step 2:

Shutdown the database.

 

Step 3:

Start the database in mount state with exclusive restrict mode. 

SQL> startup mount exclusive restrict;


Step 4:

Drop the database with below command. It will drop the database and cleanup the space which is occupied by datafiles. Make sure we are dropping the correct database. We can monitor the progress of drop database by tailing the alert log.



 

 





Thanks for going through the post.....Please consider this post for only practice purpose and should not practice in any client's environment.


 

No comments:

Post a Comment