How to Delete Non-CDB or 11g Database or 11g DB Home from ExaCC

Share on:

exacc

Objective: How to delete/remove Non-CDB or 11g database or database home from ExaCC

 

Prerequisite: Should have Non-CDB or 11g home and database on ExaCC environment.

In this blog post, I will show you how to remove 11g or non-CDB databases from ExaCC because this is not the same as removing CDB or PDB using dbaascli.

I have one 11.2.0.4 database on ExaCC and when I tried to remove using dbaascli I got the below error.

[root@node1 ~]# dbaascli database delete --dbname THD
DBAAS CLI version 23.3.1.0.0
Executing command database delete --dbname THD
Job id: fcdf472c-64e2-4513-abc6-6ede1508b93f
Session log: /var/opt/oracle/log/THD/database/delete/dbaastools_2023-11-15_02-02-49-PM_36887.log
Loading PILOT...
Session ID of the current execution is: 2
Log file location: /var/opt/oracle/log/THD/database/delete/pilot_2023-11-15_02-02-54-PM_38387
-----------------
Running Plugin_initialization job
Completed Plugin_initialization job
Acquiring read lock: _u02_app_oracle_product_11.2.0_dbhome_2
-----------------
Running Validate_version job
Execution of Validate_version failed
[FATAL] [DBAAS-70280] The current API does not support database deletion on the specified Oracle home.
   CAUSE: The detected Oracle home version is '11.2.0.4.220118'.
   ACTION: Refer to the Oracle Cloud Service documentation to delete a database for this version.
Releasing lock: _u02_app_oracle_product_11.2.0_dbhome_2

Then I thought let’s instead remove DB home as this is the only DB is that home but I got below error

Running OH_deletion_prechecks job
Execution of OH_deletion_prechecks failed
[FATAL] [DBAAS-70356] Operation not supported in a nonempty home.
   CAUSE: Oracle home '/u02/app/oracle/product/11.2.0/dbhome_2' contains these databases: 'THD,'
   ACTION: Verify the requested home and try again.
*** Executing jobs which need to be run always... ***

I finally found the right tool to remove the Non-CDB database or 11g database, using OCDE (Oracle Cloud Deployment Engine). I use the below command to remove my 11g Database.

[root@node1 ~]# /var/opt/oracle/ocde/ocde -deldb -exa -dbname=THD
Starting OCDE
Config file is /var/opt/oracle/ocde/ocde.cfg

WARN : Parameter image_tag is not a valid parameter. Please check the usage

JOBID: e2dbf583-13b0-4ecc-9ee0-12928097e3f8
Use of uninitialized value in pattern match (m//) at /var/opt/oracle/ocde/ocde line 1873.
Use of uninitialized value in pattern match (m//) at /var/opt/oracle/ocde/ocde line 1925.
Logfile is : /var/opt/oracle/log/THD/ocde/ocde_2023-11-16_10:05:43.176016238238.log
Removed all entries from cfg file : /var/opt/oracle/ocde/ocde.cfg matching passwd

##Invoking assistant dg
Use of uninitialized value in string eq at /var/opt/oracle/ocde/ocde line 3823.
Using cmd : /bin/su - root -c "/var/opt/oracle/ocde/assistants/dg/dgcc -dbname THD -action delete"

##Done executing dg

##Invoking assistant bkup
Using cmd : /var/opt/oracle/ocde/assistants/bkup/bkup -out /var/opt/oracle/ocde/res/bkup.out -libopc_mode="prod" -bkup_cron_entry="yes" -bkup_zdlra="no" -bkup_use_rcat="no" -bkup_oss_recovery_window="30" -dbname="THD" -dbtype="rac" -bkup_cfg_files="no" -edition="enterprise" -bkup_archlog_frequency="30" -bkup_nfs="no" -acfs_vol_dir="/var/opt/oracle/dbaas_acfs" -bkup_daily_time="23:52" -bkup_nfs_recovery_window="30" -archlog="yes" -firstrun="no" -action="delete" -bkup_oss="no" -bkup_disk_recovery_window="7" -bkup_disk="no" -action=delete

##Done executing bkup
##Invoking assistant dbda
Using cmd : /var/opt/oracle/ocde/assistants/dbda/dbda -out /var/opt/oracle/ocde/res/dbda.out -bp="default" -flashback="yes" -oneoff_oss_store="none" -bundle="extreme-perf" -nid="no" -configureEM="no" -dbname="THD" -dbtype="rac" -sga_target="3800" -edition="enterprise" -psu="default" -flashback_days="1" -pga_target="2500" -ncharset="AL16UTF16" -flashback_minutes="1440" -pdb_name="pdb1" -archlog="yes" -charset="AL32UTF8" -build="no" -asm="false" -dbtemplate="oltp" -grid_home="/u01/app/12.1.0.2/grid" -action="delete" -cdb="yes" -action=delete

##Done executing dbda
INFO: corereg: secure: Removed all entries matching passwd or decrypt_key from corereg file /var/opt/oracle/creg/THD.ini
INFO: Total time taken by ocde is 275 seconds
Use of uninitialized value in pattern match (m//) at /var/opt/oracle/ocde/ocde line 1478.
Use of uninitialized value in string ge at /var/opt/oracle/ocde/ocde line 1515.

#### Completed OCDE Successfully ####

Now I am able to remove the database home using dbaascli.

[root@node1 ~]# dbaascli dbHome delete --oracleHome /u02/app/oracle/product/11.2.0/dbhome_2
DBAAS CLI version 23.3.1.0.0
Executing command dbHome delete --oracleHome /u02/app/oracle/product/11.2.0/dbhome_2
Job id: 9bc6ac67-61c4-474a-a84f-e383ab1369c9
Session log: /var/opt/oracle/log/dbHome/delete/dbaastools_2023-11-16_10-11-36-AM_289473.log
Loading PILOT...
Session ID of the current execution is: 13149
Log file location: /var/opt/oracle/log/dbHome/delete/pilot_2023-11-16_10-11-47-AM_292065
-----------------
Running Plugin_initialization job
Completed Plugin_initialization job
-----------------
Running OH_deletion_prechecks job
Completed OH_deletion_prechecks job
Acquiring write lock: _u02_app_oracle_product_11.2.0_dbhome_2
Acquiring write lock: provisioning
-----------------
Running OH_detach job
Completed OH_detach job
-----------------
Running OH_remove_directory job
Completed OH_remove_directory job
Releasing lock: _u02_app_oracle_product_11.2.0_dbhome_2
Releasing lock: provisioning
-----------------
Running Post_oh_deletion job
Completed Post_oh_deletion job
-----------------
Running Generate_dbhome_system_details job
Acquiring write lock: global_dbsystem_details_generation
Releasing lock: global_dbsystem_details_generation
Completed Generate_dbhome_system_details job
dbaascli execution completed
[root@node1 ~]#

 

Share on:

More from this Author

oac

How to Import Custom Visualization in Oracle Analytics Cloud to See Images

In this blog, I will show you how to download and import the Image Gallery Plugin into OCI Oracle Analytics Cloud. using this plugin we can see ... Read More

Oracle 23c INTERVAL Data Type Aggregations

Analyze Invoices with Oracle Analytics and AI Document Understanding

OCI Document Understanding is an AI service that enables developers to extract text, tables, and other key data from document files through APIs and ... Read More

Back to Top