Recently encountered a ORA-17629, ORA-17627, ORA-12154 error during cloning from the active database, initially thought it was a bug. Oracle bug is too much, and it has become a habit of thinking. Khan! The error message is that you cannot connect to the remote database, and the connection string cannot be parsed. Listener, configured tnsnames from auxiliary dB to target dB, and all are connected ......
1. Fault
-- The following operations are performed on the machine where auxiliary dB is located.
[Oracle @ linux4 ~] $ Export oracle_sid = sybo3
[Oracle @ linux4 ~] $ Sqlplus/As sysdba
SQL> startup nomount;
[Oracle @ linux4 ~] $ RMAN target sys/Oracle @ tar auxiliary sys/Oracle @ aux
Recovery MANAGER: Release 11.2.0.1.0-production on Wed Jul 31 16:00:59 2013
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connected to target database: sybo3 (dbid = 2347733014)
Connected to auxiliary database: sybo3 (not mounted)
RMAN> duplicate database to sybo3 from active database spfile nofilenamecheck;
Starting duplicate dB at 31-jul-13
Using target database control file instead of recovery catalog
Allocated channel: ora_aux_disk_1
Channel ora_aux_disk_1: SID = 125 device type = Disk
Contents of memory script:
{
Backup as copy Reuse
Targetfile '/u01/Oracle/db_1/dbs/spfilesybo3.ora' auxiliary format
'/U01/Oracle/db_1/dbs/spfilesybo3.ora ';
SQL clone "alter system set spfile =''/u01/Oracle/db_1/dbs/spfilesybo3.ora ''";
}
Executing memory script
Starting backup at 31-jul-13
Allocated channel: ora_disk_1
Channel ora_disk_1: SID = 23 device type = Disk
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of duplicate dB command at 07/31/2013 16:01:07
RMAN-03015: Error occurred in stored script memory script
RMAN-03009: failure of Backup command on ora_disk_1 channel at 07/31/2013 16:01:07
ORA-17629: cannot connect to the remote database server
ORA-17627: ORA-12154: TNS: cocould not resolve the connect identifier specified
ORA-17629: cannot connect to the remote database server
2. Fault Analysis and Solution
The above is a bunch of RMAN and ora errors.
An error occurred while executing the script backup as copy reuse, that is, an error RMAN-03009 occurred during Backup
Followed by the ORA-17629, cannot connect to the remote database server, ORA-17627 followed by the ORA-12154, which is due to the failure to parse the string
Let's see what the problem with ORA-17629 is.
[Oracle @ linux4 ~] $ Oerr ora 1, 17629
17629,000 00, "cannot connect to the remote database server"
// * Cause: connecting to the remote server specified by database connect
// String for netowrk File Transfer failed.
// * Action: Check additional error messages
Important message: For netowrk File Transfer failed, network file transmission failed.
Because we use cloning from an active database, the data files of the active database should be copied to the secondary database over the network, more specifically through Oracle Net.
That is to say, although we have configured a connection to the target dB and the tnsnames to the auxiliary dB on the secondary Database End, the target dB end also needs to connect to the auxiliary dB to transfer files.
The above is just a preliminary speculation. We found a description of this problem from Oracle Metalink. It is the tnsnames configured between the two servers to the target dB and auw.iary dB.
Check the configuration of tnsnames. ora for the two hosts.
[Oracle @ linux3 admin] $ more tnsnames. ora
# Tnsnames. ora network configuration file:/u01/Oracle/db_1/Network/admin/tnsnames. ora
# Generated by Oracle configuration tools.
Tar = # target server only has tnsnames. ora to target DB
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.7.25) (Port = 1531 ))
)
(CONNECT_DATA =
(SERVICE_NAME = sybo3.orasrv. com)
)
)
[Oracle @ linux4 admin] $ more tnsnames. ora # auxiliary server has tnsnames. ora to target dB and auxiliary DB
Tar =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.7.25) (Port = 1531 ))
)
(CONNECT_DATA =
(SERVICE_NAME = sybo3.orasrv. com)
)
)
Aux =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.7.26) (Port = 1531 ))
)
(CONNECT_DATA =
(SERVICE_NAME = sybo3.orasrv. com)
)
)
-- Author: Robinson Cheng
-- Blog: http://blog.csdn.net/robinson_0612
Solution
Add tnsnames. ora to the auxiliary dB on the target server, that is, use the same tnsnames entry as the auxiliary server.
The connectivity of tnsnames is tested below
[Oracle @ linux3 admin] $ tnsping aux
[Oracle @ linux3 admin] $ tnsping tar
[Oracle @ linux4 admin] $ tnsping aux
[Oracle @ linux4 admin] $ tnsping tar
When duplicate again, success bird, tea yo!
3. Metalink description (Doc ID 1144273.1)
Applies:
Oracle Database-Enterprise Edition-version 11.2.0.1 and later
Information in this document applies to any platform.
Symptoms
The duplicate database from active failed with the following errors:
ORA-17629: cannot connect to the remote database server
ORA-17627: ORA-12154: TNS: cocould not resolve the connect identifier specified
ORA-17629: cannot connect to the remote database server
Cause
Cause 1:
For active duplication you need to connect to the target and auxiliary DB using net service name, even if you are running RMAN at the auxiliary dB.
The net service name to connect to the auxiliary dB shoshould also be configured at the target database.
In the tnsnames. ora on the machine of the target database, there are 2 services created to connect to auxiliary database that have the same "service name" but "different" configuration.
Possible cause 2:
Mismatch of parameters default_domain and db_domain
Db_domain = prod. world # init <Sid>. ora
Default_domain = prod. world # sqlnet. ora
# Default_domain defined on sqlnet. ora is 'case' sensitive and when defined must match
Db_domain initialization parameter
Solution
1. To be sure that the tnsnames. ora file of each machine (machine where is the source database and machine where is the auxiliary database) has the service name to connect to auxiliary database.
2. Verify that there are not duplicate SERVICE_NAME with different configuration in the tnsnames. ora file.
As per the step 2 of the below rman doc:
Http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#i1008564
Step 2: Establish Oracle Net connectivity to the auxiliary instance
When duplicating from an active database, you must first have connected as sysdba to the auxiliary instance by means of a net service name. This net service name must also be available on the source database instance.
The source database instance, to which RMAN is connected as target, uses this net service name to connect directly to the auxiliary database instance.
Double check using the following commands on the target and auxiliary
% Tnsping <target_db>
% Tnsping <auxiliary_db>
Once this is executed for the target and auxiliary, it shoshould return the same 'connect' information.
Additional note:
If the listener is started from a different environment to RMAN Client
Then server processes will try to resolve the auxiliary service name using $ tns_admin/tnsnames. ora where the value of tns_admin is as set in the 'listener runtime environment '.
References
Method for converting the cloned file location in the RMAN Database
RMAN duplicate)
RMAN-based database cloning on the same machine
User-managed database clone
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Customize the date and time format displayed by RMAN
Backup and recovery of read-only tablespace
Incomplete recovery of Oracle based on user management
Understanding using backup controlfile
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Oracle backup policy (RMAN) in Linux)
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine
Run the SQL statement at the RMAN prompt.
Oracle RMAN-based Incomplete recovery (Incomplete recovery by RMAN)
RMAN restores archivelog)