ORA-17629: Cannot connect to the remote database server on resync catalog from a physical standby database

On the standby database we were getting the below error. Both the primary and standby are 4 node RACs.

[stbysrvr-STBYDB4] rman target /
 
Recovery Manager: Release 11.2.0.3.0 – Production on Tue Nov 22 10:48:27 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
 
connected to target database: PRODDB (DBID=492253988, not open)
 
RMAN> connect catalog rman/<rman password>@RMAN_REMOTE_CAT
 
connected to recovery catalog database
 
RMAN> resync catalog;
 
starting partial resync of recovery catalog
ORA-20079: full resync from primary database is not done
 
doing automatic resync from primary
resyncing from database with DB_UNIQUE_NAME PRODDB
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 11/22/2016 10:49:00
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-00942: table or view does not exist
 
RMAN> exit

Logged on to the primary database

[primsrvr-PRODDB4] rman target /

Recovery Manager: Release 11.2.0.3.0 – Production on Tue Nov 22 15:54:47 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PRODDB (DBID=492253988)

RMAN> connect catalog rman/<rman password>@RMAN_REMOTE_CAT

connected to recovery catalog database

RMAN>  show all for db_unique_name PRODDB;

starting full resync of recovery catalog
full resync complete
RMAN configuration parameters for database with db_unique_name PRODDB are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 5 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘+DG_ORA1/PRODDB/backup/snapcf_PRODDB4.f’; # default
starting full resync of recovery catalog
full resync complete

RMAN> exit

Recovery Manager complete.

The above command took about 3-5 minutes to run.

Back to the standby database

[stbysrvr-STBYDB4] rman target /

Recovery Manager: Release 11.2.0.3.0 – Production on Tue Nov 22 11:01:21 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PRODDB (DBID=492253988, not open)

RMAN> connect catalog rman/<rman password>@RMAN_REMOTE_CAT

connected to recovery catalog database

RMAN> resync catalog;

starting partial resync of recovery catalog
partial resync complete

RMAN> exit

Recovery Manager complete.

After that I ran the usual script to backup the database.

Author: Dean Capps

Database consultant at Amazon Web Services.