How to delete a database in Oracle?

To delete an Oracle database, follow these steps:

  1. Firstly, make sure you have the permission to delete the database. If you are an administrator user or a user with SYSDBA privileges, you can proceed to the next step.
  2. Login to the database as SYSDBA using the following command in the command line or terminal:
sqlplus / as sysdba
  1. Run the following command to shut down the database:
shutdown immediate
  1. Make sure the database is closed before logging in to the database again with the SYSDBA identity.
  2. Execute the following command to delete the database:
startup mount exclusive restrict;
drop database;
exit;
  1. After deleting the database, you can close SQL*Plus.

Please be sure to backup important data before deleting the database. Deleting the database is an irreversible operation and data cannot be recovered once deleted.

bannerAds