One of our customer hit below message during backup of a Standby Database. Db version is 11.2.0.4 (yeah I know its old one) and linux version is OEL 7.8
Error messages are:
RMAN-03090: Starting backup at 20-May-23
RMAN-06820: WARNING: failed to archive current log at primary database
RMAN-06003: 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
There are several suggestion for this error. You may hit this error because Sqlnet configuration modifications preventing RMAN from connecting to the primary database to switch online logs. This is new functionality in 11.2.0.4 and beyond.
In this example, a removal of TNS entry in the standby used by RMAN is missing.
Workaround 1 (IF TNSENTERY MISSING)
- Generate RMAN trace as below:
$ rman target sys/passwd@tns_standby debug trace=/tmp/rmanDebug_new.trc log=/tmp/rmanLog_new.txt
RMAN> Run the backup script here <<<
In our example
RMAN> backup as compressed backupset archivelog all not backed up 1 times filesperset 40 format ‘/xxx/dbarch_%U.rman’ TAG ‘ARCFULL_20230519’
- Search for the string “lprimary_db_cs” in the trace file:
DBGSQL: B :lprimary_db_cs =
The debug output will show something like:
Rman trace file:
============
DBGSQL: TARGET> declare null_retVal varchar2(1); begin null_retVal := sys.dbms_backup_restore.remoteSQLExecute( source_dbuname=> :primary_dbuname, source_cs => :lprimary_db_cs, stmt => 'alter system archive log current'); end; DBGSQL: sqlcode = 17629 DBGSQL: B :primary_dbuname = PRIMARY_DBSID << YOUR PRIMARY DB SID HERE DBGSQL: B :lprimary_db_cs = PRIMARY_DBSID DBGSQL: error: ORA-17629: Cannot connect to the remote database server (krmkosqlerr) DBGSQL: ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified (krmkosqlerr) DBGSQL: ORA-17629: Cannot connect to the remote database server (krmkosqlerr) DBGSQL: ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 7851 (krmkosqlerr) DBGSQL: ORA-06512: at line 1 (krmkosqlerr) DBGSQL: (krmkosqlerr) DBGSQL: EXITED krmkosqlerr RMAN-06820: WARNING: failed to archive current
- Add the corresponding entry in the tnsnames.ora file of standby database which should be able to ping to primary as below:
service_name2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = .com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME =service_name2)
)
)
- If entry exists, test the connection. From standby server, execute:
$ sqlplus ‘sys/password@ as sysdba’
Workaround 2(IF TNSNAMES Entery still exists)
Do not use operating system authentication to login with RMAN. Use a username and password.
That is, do not use just the “/” (operating system authentication) connect to the standby database:
$ rman target /
Connecting as ‘rman target /’
Instead put in the username and password for the SYSDBA user:
$ rman target sys/password@stby
Connecting as ‘rman target sysdba_user/password@stby’
Note: The password, within the password file, for the primary and standby should be identical.
Bir Cevap Yazın