This is happening when one is trying to delete a database using DBCA utility. The reason for the failure is that there is no information about the database in /etc/oratab:
[[email protected] dbs]$ cat /etc/oratab # # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:<N|Y>: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # [[email protected] dbs]$
Let’s reproduce it:
[[email protected] dbs]$ echo $ORACLE_SID cdb1 [[email protected] dbs]$ dbca -silent -deleteDatabase -sourceDB $ORACLE_SID -sysDBAUserName sys -sysDBAPassword sys -forceArchiveLogDeletion [FATAL] [DBT-10201] Delete database operation cannot be performed. CAUSE: There are no databases present on the system.
Let’s add the information of the database into /etc/oratab file:
[[email protected] dbs]$ echo "cdb1:/u01/app/oracle/product/19.0.0/dbhome_1:Y" > /etc/oratab [[email protected] dbs]$ cat /etc/oratab cdb1:/u01/app/oracle/product/19.0.0/dbhome_1:Y [[email protected] dbs]$
Let’s try again to drop it:
[[email protected] dbs]$ dbca -silent -deleteDatabase -sourceDB $ORACLE_SID -sysDBAUserName sys -sysDBAPassword sys -forceArchiveLogDeletion [WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed. Prepare for db operation 32% complete Connecting to database 35% complete 39% complete 42% complete 45% complete 48% complete 52% complete ORA-01109: database not open 65% complete Updating network configuration files 68% complete Deleting instance and datafiles 84% complete 100% complete Database deletion completed. Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb1_dgb/cdb1_dgb.log" for further details.
Happy ending 🙂