How to Drop Database in Oracle Database 19c

Hi,

Sometimes you may need to drop Oracle database especially in test or development databases.

 

Mostly test or development databases are expired when testing or development is done. And When these databases are not used, we should drop this database with following steps.

 

You cannot drop Oracle database when it is open. You will get following error if you try this.

 

 

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 26 07:13:04 2019
Version 19.2.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.2.0.0.0

SQL> drop database;
drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation

 

You should shutdown database and open it mount exclusive mode.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL>

SQL> startup mount restrict
ORACLE instance started.

Total System Global Area 1140849896 bytes
Fixed Size 8895720 bytes
Variable Size 838860800 bytes
Database Buffers 285212672 bytes
Redo Buffers 7880704 bytes
Database mounted.
SQL>

 

 

 

Then you can drop database like following.

 

SQL> drop database;

Database dropped.

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.2.0.0.0
SQL>
SQL> exit
[[email protected] ~]$

 

You can see that Oracle database 19c is dropped.

 

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 26 07:19:54 2019
Version 19.2.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to an idle instance.

SQL>     

 

 

You can read the following post to learn How To Create A Database Manually and How to Create a Database Using DBCA Silent Mode in Oracle

How To Create A Database Manually and How to Create a Database Using DBCA Silent Mode in Oracle

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

 1,093 views last month,  1 views today

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

One comment

  1. Oh my goodness! an amazing article dude. Thank you Nonetheless I am experiencing situation with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting equivalent rss problem? Anyone who is aware of kindly respond. Thnkx

Leave a Reply