Site icon IT Tutorial

ORA-17629: Cannot connect to the remote database server

I got ” ORA-17629: Cannot connect to the remote database server  ” error in Oracle database during Standby database ( Dataguard ).

 

ORA-17629: Cannot connect to the remote database server

 

Details of error are as follows. You can see this errors in the alertlog of Standby database.

ORA-17629: Cannot connect to the remote database server
2021-01-05T23:53:15.730486+03:00
Errors in file /u01/app/oracle/diag/rdbms/msdbdg/msdbDG1/trace/msdbDG1_pr0g_46224.trc:
ORA-17627: 
ORA-17629: Cannot connect to the remote database server
2021-01-05T23:53:16.622042+03:00
rfs (PID:79491): Archived Log entry 20986 added for B-1059755612.T-8.S-2822 ID 0x0 LAD:2
2021-01-05T23:53:16.894047+03:00
rfs (PID:79491): Opened log for T-8.S-2828 dbid 2054866743 branch 1059755612
2021-01-05T23:53:18.257371+03:00
Errors in file /u01/app/oracle/diag/rdbms/msdbdg/msdbDG1/trace/msdbDG1_pr0g_46224.trc:
ORA-17627: 
ORA-17629: Cannot connect to the remote database server

 

 

ORA-17629: Cannot connect to the remote database server | Standby database Fails

 

If you got this error on Standby database and MRP process is running too slow or MRP is not running, This error is related with the standby database is used in Active Data Guard (ADG) mode.

Oracle attempts to use Automatic Block Recover Feature (AMBR) to fix a corrupted block

To solve this error, you can backup the datafiles from Production database and Restore these datafiles on the Standby database, and problem will be solved.
Disable the AMBR ( “_auto_bmr”=disabled )
If you don’t want to perform backup and restore the related datafiles, then you can disable the AMBR on standby database, and restart database and start MRP again as follows.
SQL > alter system set "_auto_bmr"=disabled scope=spfile sid='*';

 

Then restart the Standby database instance and Start Media Recovery Process.

SQL > shutdown immediate;

SQL > startup mount;

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

 

 

ORA-17629: Cannot connect to the remote database server | Active Duplicate on RAC

 

If you got this error in the RMAN active duplication of RAC database fails on restart operation with the following error messages:


RMAN-03002: failure of Duplicate Db command at 02/17/2015 15:12:11
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on t0 channel at 02/17/2015 15:11:48
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

 

ORA-12154 is raised whenever the TNS alias is not found on tnsnames.ora

After verification of tnsanames.ora files from both installations on Target and Auxiliary we see all the proper entries are there

Still the RMAN duplicate command fails on ORA-12154

The reason for ORA-12154 being raised is because the process is looking for tnsnames.ora in a different ORACLE_HOME on the Auxiliary side.   This different ORACLE_HOME on Auxiliary side is usually the GRID HOME.

On 11G RAC Customers can configure SCAN Listener to handle failover connections on DB and ASM instances.

When RMAN duplicate is executed it needs to shutdown/startup the database several times.  Once the DB is down, a TNS connection can get lost on next startup since the corresponding service associated with the instance is no longer available.  The connection from RMAN thus fails when looking for the tnsnames.ora file under the wrong home.

 

 

To solve this error, There are two ways to workaround this problem

1) Copy the tnsnames.ora file form the RDBMS Home to the GRID Home

2) Establish a direct connection instead of using a TNS alias.  For example:


RMAN> connect auxiliary sys/<password>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service name>)(UR=A)))

 

NOTE:  There should be no spaces within connect string.

 

MOS docs recommended to type TNS in a line without any blanks, and add (UR=A) in Standby TNS.

 

If you want to learn more details about Oracle Dataguard and how to install Standby database, read the following post.

Oracle DataGuard Physical Standby Installation Step by Step Using RMAN -1

 

 

 

Do you want to learn more details about RMAN, then Click this Link and read the articles.

RMAN Tutorial | Backup, Restore and Recovery Tutorials For Beginner Oracle DBA

Exit mobile version