Getting error ORA-12547: TNS:lost contact when running RMAN during Snapsync (KBA8100)
KBA
KBA# 8100
Issue
RMAN fails with the following stack:
Recovery Manager: Release 19.0.0.0.0 - Production on Thu Sep 2 03:32:16 2021 Version 19.11.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. RMAN> RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== ORA-12547: TNS:lost contact
Prerequisites
Any Delphix engine up to version 6.0.9.0 and Oracle database
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0 5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
Resolution
The Oracle file $ORACLE_HOME/install/orabasetab had some incorrect configuration that did not permit RMAN to run properly.
It was possible to run RMAN after setting the environment variable $ORACLE_BASE in .bashrc as a workaround. Environment variables $ORACLE_HOME and $ORACLE_SID are passed via Delphix scripts.
Starting from Delphix version 6.0.10.0, we are now including $ORACLE_BASE in the Snapsync scripts.
Troubleshooting
Full stack of the error noticed:
Recovery Manager: Release 19.0.0.0.0 - Production on Thu Sep 2 03:32:16 2021 Version 19.11.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. RMAN> RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== ORA-12547: TNS:lost contact RMAN> RMAN> echo set on RMAN> RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt 2> PARMS='SBT_LIBRARY=/opt/delphixtoolkit/Delphix_4999cc54626e_1ef5efbe0d8e_16_host/toolkits/link/oracle/linux/x86/lib64/libobk.so, 3> ENV=( 4> DELPHIX_CONFIG_DIR=/opt/delphixtoolkit/Delphix_4999cc54626e_1ef5efbe0d8e_16_host/toolkits/link/oracle/linux/x86/lib64, 5> DELPHIX_NO_OUTPUT=true 6> )'; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of allocate command at 09/02/2021 03:32:17 RMAN-06171: not connected to target database RMAN> RMAN> DELETE NOPROMPT FORCE 2> BACKUP OF 3> CONTROLFILE DATABASE CONTROLFILE SPFILE 4> DEVICE TYPE sbt 5> TAG 'DLPX202108301125321F18FF015CC9'; using target database control file instead of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of delete command at 09/02/2021 03:32:17 RMAN-12010: automatic channel allocation initialization failed RMAN-06171: not connected to target database