Backups on Standby DB failing with ERROR ORACLE DTC 21
Problem description
- Primary and Standby are configured with Recovery Catalog
- Standby is registered with Druva for backup. Uses:
- OS Authentication
- Recovery catalog
- Structural change happens on primary database and logs are synced on standby
- Trigger backup on standby
- Backup fails with Oracle_DTC 21 error code.
Cause
This is because RMAN is able to connect to a standby database with a catalog user but unable to execute commands on it.
Traceback
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ===========================================================
RMAN-03002: failure of crosscheck command at 04/26/2023 12:00:34
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of partial resync command on default channel at 04/26/2023 12:00:34
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-00942: table or view does not exist
Resolution
- Need to resync standby with primary database
Command to resync:
Connect to standby DB using catalog:
rman target sys/oracle@<tns_standby> catalog <cat_user>/<cat_pass>@<tns_catalog_db>;Resync with primary DB:
resync catalog from db_unique_name <db_unique_name_of_primary>;
- Now the backup should work.