In this short blog post I want to write about an issue I ran into during the creation of a new Data Guard for a long-existing database.
Table of Contents
Error
In this case the automation was still using the old Data Guard Association feature. To create the Data Guard, the OCI CLI call oci db data-guard-association create from-existing-vm-cluster
was used.
The corresponding work request failed after a few minutes with the following error.

Analysis
During the analysis together with Oracle Support, an issue with the creg file of the database was detected. The contents were not as expected.
$> cat /var/opt/oracle/creg/DB1.ini
agentdbid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
db_home=/u02/app/oracle/product/19.0.0.0/dbhome_4
dg_stage=SEND_WALLET
full_version=19.25.0.0.0
ohome_name=OraHome4
oracle_home=/u02/app/oracle/product/19.0.0.0/dbhome_4
shared_oh=yes
stage=SEND_WALLET
tns_admin=/u02/app/oracle/product/19.0.0.0/dbhome_4/network/admin/DB1
Compared to the correct version of this file, a lot of required entries were missing.
$> cat /var/opt/oracle/creg/DB1.init
flashback=yes
dbmac=
net_security_enable=yes
acfs_vol_dir=/var/opt/oracle/dbaas_acfs
bkup_oss=no
edition=enterprise
tde_ks_login=auto
archlog=yes
ohome_owner_group=dba
ohome_name=OraHome4
charset=AL32UTF8
bkup_cfg_files=no
dbtemplate=oltp
pdb_name=PDB1
sm=yes
tde_isolated_config=0
pga_target=5000
subset_locking=no
grid_home=/u01/app/19.0.0.0/grid
bkup_zdlra=no
cdb=yes
grid_version=19000
bkup_use_rcat=no
flashback_days=1
libopc_mode=prod
dbtype=
sga_target=4096
bkup_disk=no
version=19000
dbname=DB1
nodelist=node1,node2
dg_config=no
ncharset=AL16UTF16
domain=us.oracle.com
tde_ks_acfs=yes
bundle=
multi_node_locking=yes
bkup_daily_time=2:16
flashback_minutes=120
db_unique_name=DB1_SITE1
enable_db_unique_name=true
data_grp=DATAC3
reco_grp=RECOC3
bkup_cfg_dgobs_spec=dgobscfg.spec
net_security_encryption_type=requested
shared_oh=no
lvm=yes
net_security_integrity_methods=SHA256,SHA384,SHA512
oh_acfs=no
dg_observer_host=no
dv=no
tns_admin=/u02/app/oracle/product/19.0.0.0/dbhome_4/network/admin/DB1
dbid=4182632032
netsec_server_encryption_type=requested
net_security_encryption_methods=AES256,AES192,AES128
bkup_archlog_frequency=60
bkup_rman_retention=
tls_version=1.2
cloud_domain=us.oracle.com
dbmac=exa
net_security_integrity_enable=yes
lsnr_port=1521
bkup_custom_connect=no
fra_mnt=RECOC3
net_security_encryption_target=server
em_port=5508
net_security_encryption_enable=yes
opcm=no
bkup_type=none
db_home=/u02/app/oracle/product/19.0.0.0/dbhome_4
dg_observer=no
cplat=opc
netsec_server_encryption_methods=AES256,AES192,AES128
tde_status=enabled
bkup_cfg_os_spec=oscfg.spec
sid=DB11
tde_ks_loc=/var/opt/oracle/dbaas_acfs/DB1/wallet_root/tde/
atp=false
bkup_nfs_recovery_window=30
bkup_script_loc=/var/opt/oracle/dbaas_acfs/DB1/bkup
fra_loc=/var/opt/oracle/dbaas_acfs
wallet_loc=/var/opt/oracle/dbaas_acfs/DB1/db_wallet
bkup_oss_l0_day=Sun
psu_patched=1
dg_enabled=no
net_security_integrity_target=server
redo_mnt=RECOC3
netsec_server_integrity_methods=SHA256,SHA384,SHA512
netsec_server_integrity_clevel=accepted
lsnr_ssl_port=2484
dbtype=rac
bkup_cfg_db_spec=dbcfg.spec
sys_alias=DB1
enable_fips=0
netsec_server_integrity_status=enabled
bkup_nfs_mount_dir=/mnt/dbaas_backup
sys_cred_loc=/var/opt/oracle/dbaas_acfs/DB1/db_wallet
full_version=
oracle_base=/u02/app/oracle
bkup_channels_node=4
pdb_service_name=
net_security_integrity_checksum_level=accepted
oradata=DATAC3
bkup_rcat_sid=CATALOG
aloc=/var/opt/oracle/ocde/assistants
data_mnt=DATAC3
enable_wallet_root=1
bkup_lsnr_tcp_port=1522
grid_dbname=+ASM
oneoff_oss_store=none
bkup_rman_compression=low
bkup_custom_cronentry=no
netsec_server_encryption_status=enabled
bkup_zdlra_recovery_window=30
oracle_home=/u02/app/oracle/product/19.0.0.0/dbhome_4
tde_ks_bak=/u02/app/oracle/admin/DB1/tde_wallet
bundle=
standbydb=
Solution
To fix this issue, the creg file needs to be recreated. This can be achieved by running the following dbaascli call as root.
$> dbaascli registerdb registry --action initialize --db DB1 --udb DB1_SITE1
DBAAS CLI version 25.1.1.0.0
Executing command registerdb registry --action initialize --db DB1 --udb DB1_SITE1
DBNAME = DB1 ::: ENV = ExaCS ::: ExaBM = 0 :: Action = initialize :: UNIQUE_DB_NAME = DB1_SITE1
[INFO] [DBAAS-14016] - The usage of this command is deprecated.
ACTION: Creation of database outside of dbaastools and registering it with current command is not recommended. It is recommended to use 'dbaascli database duplicate' for database migration or cloning operations.
INFO : Found sid from srvctl : DB11
CREG File = /var/opt/oracle/log/registerdb/creg_report/DB1.ini
------------------------------------------------------------------------------------------------------
CREG File is generated as /var/opt/oracle/log/registerdb/creg_report/DB1.ini
CREG will be setup across all nodes
INFO: Setting up creg on node1
INFO: Setting up creg on node2
INFO: Setting up creg on
Connection to node1 closed.
Connection to node2 closed.
INFO: Setting up link for DB1_SITE1.ini on node1
Connection to node1 closed.
Connection to node2 closed.
Connection to node2 closed.
INFO: Setting up link for DB1_SITE1.ini on node2
Connection to node2 closed.
As you can see this command is marked as deprecated. The only documentation you found about this command is part of the ExaCC Gen 1 documentation.