I'm running RMAN on a physical standby database in Dataguard configuration and I'm getting an ORA-12154 error:
connected to target database: PHMWEB_P (DBID=1607283974)
connected to recovery catalog database
RMAN> run {
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG DELETE INPUT;
CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
}
Starting backup at 10-JUN-15
RMAN-06820: WARNING: failed to archive current log at primary database
ORACLE error from target database:
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-17629: Cannot connect to the remote database server
Dataguard is working just fine, tnsping works, and I can connect via sqlplus on the standby system without any issue. The DBID is correct for my primary database.
However, the actual unique name of my primary DB is PHMWEB_PROD, not PHMWEB_P. Could RMAN only be looking at the first 8characters of the database_unique_name
(Adding an entry for PHMWEB_P in tnsnames.ora for the primary also did not solve this issue.)
The backups are working; the only part that isn't is RMAN connecting to the primary to force an archivelog switch (I think that's what it's trying to do), so there's always an un-applied archive log that isn't deleted.
This isn't really a problem; I've been able to successfully switch roles using DGMGRL and restore the database from backups in a test, just want to track down this annoying error.