On creating a Standby database on OCI Exadata Cloud service if you run into the below errors :
Error :
.————————————————-.
| RESULTS |
+—————————————-+——–+
| CHECK TYPE | STATUS |
+—————————————-+——–+
| check_file_creg | PASSED |
| check_file_sqlnet | PASSED |
| check_file_tnsnames | FAILED |
| db_status | PASSED |
| listener_status_listener | PASSED |
| listener_status_scan_listener | PASSED |
| node_status | PASSED |
| oracle_managed_files | PASSED |
| parameter_db_create_file_dest | PASSED |
| parameter_db_recovery_file_dest | PASSED |
| parameter_log_archive_config | PASSED |
| parameter_log_archive_dest_1 | FAILED |
| parameter_remote_listener | PASSED |
| space_check_/var/opt/oracle/dbaas_acfs | PASSED |
| space_check_RECO | PASSED |
| tnsport_check | PASSED |
| validate_sys_passwd | FAILED |
| wallet_size_check | PASSED |
|
+———–+———————————————————————————————————————————————+
| EXCEPTION | DETAILS |
+———–+———————————————————————————————————————————————+
| CDG-50611 | Parameter LOG_ARCHIVE_DEST_1 is not set |
| | Set parameter as ALTER SYSTEM SET LOG_ARCHIVE_DEST_1= |
| CDG-50620 | Pre-check failed on file ‘TNS_ADMIN/tnsnames.ora’ |
| | Check permissions, content and status of ‘TNS_ADMIN/tnsnames.ora’ |
| dg_api | CDG-50107 : DataGuard prechecks failed for stage VERIFY_DG_PRIMARY |
| | Refer the exceptions raised and fix the issues |
| | File: dg_api, Line#: 1632, Log: /var/opt/oracle/log/testdb/dbaasapi/db/dg/dbaasapi_VERIFY_DG_PRIMARY_2022-06-20_17:18:42.214072_36287.log |
‘———–+———————————————————————————————————————————————’
————————————————-+
| EXCEPTION | DETAILS |
+———–+———————————————————————————————————————————————-+
| CDG-50605 | Password validation failed for database ‘testdb’ |
| | Given password should match password set in db_wallet and database ‘testdb’ |
| CDG-50611 | Parameter LOG_ARCHIVE_DEST_1 is not set |
| | Set parameter as ALTER SYSTEM SET LOG_ARCHIVE_DEST_1= |
| dg_api | CDG-50107 : DataGuard prechecks failed for stage VERIFY_DG_PRIMARY |
| | Refer the exceptions raised and fix the issues |
| | File: dg_api, Line#: 1632, Log: /var/opt/oracle/log/testdb/dbaasapi/db/dg/dbaasapi_VERIFY_DG_PRIMARY_2022-06-17_00:39:32.946352_287312.log |
‘———–+————————————————-
Solution:
Location of DG logs on ExaCS
: /var/opt/oracle/log/<dbname>/dbaasapi/db/dg
eg: /var/opt/oracle/log/testdb/dbaasapi/testdb/dg
- Update permissions of TNS_ADMIN folder with Oracle user for the database
chmod 755 -R $ORACLE_HOME/network/admin/
- Create a new TNS entry in tnsnames.ora file like this in both Primary nodes. Use the Db name as name of the TNS entry with the service name of CDB
vi $ORACLE_HOME/network/admin/tnsnames.ora
testdb=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=demo-59938z-scan.dbclientsu.vcnsyd.oraclevcn.com)
(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=testdb_df5_syd)
(FAILOVER_MODE=
(TYPE=select)
(METHOD=basic))))
- Modify SYS password with new sys password in db_wallet
Reference : How to change SYS Password On Data guard Associated databases-EXACC Gen 2 (Doc ID 2867554.1)
mkstore -wrl /var/opt/oracle/dbaas_acfs/testdb/db_wallet -viewEntry passwd
mkstore -wrl /var/opt/oracle/dbaas_acfs/testdb/db_wallet -modifyEntry passwd NewPassword321#_
mkstore -wrl /var/opt/oracle/dbaas_acfs/testdb/db_wallet -viewEntry passwd
- Set LOG_ARCHIVE_DEST_1
show parameter log_archive_dest_1
— Using the DB_RECOVERY_FILE_DEST parameter
alter system set LOG_ARCHIVE_DEST_1=’LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) MAX_FAILURE=1 REOPEN=5 DB_UNIQUE_NAME=testdb_df5_syd ALTERNATE=LOG_ARCHIVE_DEST_10′ scope=both sid=’*’;
show parameter log_archive_dest_1
- Create the Dataguard configuration again and check from the location
sudo -s
cd /var/opt/oracle/log/testdb/dbaasapi/db/dg
less dbaasapi_VERIFY_DG_PRIMARY_2022-06-20_19:33:06.638683_103596.log
.————————————————-.
| RESULTS |
+—————————————-+——–+
| CHECK TYPE | STATUS |
+—————————————-+——–+
| check_file_creg | PASSED |
| check_file_sqlnet | PASSED |
| check_file_tnsnames | PASSED |
| db_status | PASSED |
| listener_status_listener | PASSED |
| listener_status_scan_listener | PASSED |
| node_status | PASSED |
| oracle_managed_files | PASSED |
| parameter_db_create_file_dest | PASSED |
| parameter_db_recovery_file_dest | PASSED |
| parameter_log_archive_config | PASSED |
| parameter_log_archive_dest_1 | PASSED |
| parameter_remote_listener | PASSED |
| space_check_/var/opt/oracle/dbaas_acfs | PASSED |
| space_check_RECO | PASSED |
| tnsport_check | PASSED |
| validate_sys_passwd | PASSED |
| wallet_size_check | PASSED |
‘—————————————-+——–‘
As all checks are now passed, the standby database should be created successfully