Oracle 11.2.0.4.0 SE-One, 64bit, 64-bit
ASM 11.2.0.4.0. No RAC, no cluster
OL 6.7
This is a follow-on to my 'bad eyes' post earlier. Now I'm dealing with a real operational problem I'm not understanding.
Given this script for rman DUPLICATE
oracle:dwdev$ cat duplicate_dwdev
#!/bin/sh
# active duplicate of dwdev from vbdwdev to vbdwdev6
#
export NLS_DATE_FORMAT='dd-Mon-yyyy hh24:mi:ss'
ORAENV_ASK=NO
#
#-- block in for later use
#ORACLE_SID=+ASM
#. oraenv
#asmcmd ls
#-- now go to work
ORACLE_SID=dwdev
. oraenv
#--
sqlplus / as sysdba <<EOF
set echo on
shutdown immediate
startup nomount pfile=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
EOF
#--
lsnrctl status
#--
rman << EOF
set echo on
connect target sys/mypwd@dwdev5
connect auxiliary sys/mypwd@dwdev6
connect catalog rman/mypwd@rmcat
duplicate database to dwdev
from active database
db_file_name_convert ('+DEV_SMALL','+DATA',
'+DEV_LARGE','+DATA')
spfile parameter_value_convert ('+DEV_LARGE','+DATA',
'+DEV_SMALL','+DATA')
nofilenamecheck
;
EOF
Produces this result. Notice that all 3 of my initial connections (target, aux, catalog, lines 61-72) are successful. But when it starts the actual DUPLICATE, it returns ORA-12154: (line 105). Doesn't specify which remote connection, but one would suspect the aux.
Also notice that I run lsnrctl status immediately after starting the db as NOMOUNT, and it shows STATUS BLOCKED. This is before rman gets hold of it and has, at leas initially, a good connection.
More after this listing.
oracle:dwdev$ cat duplicate.log
The Oracle base remains unchanged with value /u01/app/oracle
SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 17 14:27:20 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
SQL> SQL> ORA-01507: database not mounted
ORACLE instance shut down.
SQL> ORACLE instance started.
Total System Global Area 217157632 bytes
Fixed Size 2251816 bytes
Variable Size 159384536 bytes
Database Buffers 50331648 bytes
Redo Buffers 5189632 bytes
SQL> Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 17-MAR-2016 14:27:24
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 17-MAR-2016 10:19:14
Uptime 0 days 4 hr. 8 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.4/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/vbdwdev6/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vbdwdev6.vbdomain)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "dwdev" has 2 instance(s).
Instance "dwdev", status UNKNOWN, has 1 handler(s) for this service...
Instance "dwdev", status BLOCKED, has 1 handler(s) for this service...
Service "dwstg" has 1 instance(s).
Instance "dwstg", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Recovery Manager: Release 11.2.0.4.0 - Production on Thu Mar 17 14:27:24 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN>
echo set on
RMAN> connect target *
connected to target database: DWDEV (DBID=798779275)
RMAN> connect auxiliary *
connected to auxiliary database: DWDEV (not mounted)
RMAN> connect catalog *
connected to recovery catalog database
RMAN> duplicate database to dwdev
2> from active database
3> db_file_name_convert ('+DEV_SMALL','+DATA',
4> '+DEV_LARGE','+DATA')
5> spfile parameter_value_convert ('+DEV_LARGE','+DATA',
6> '+DEV_SMALL','+DATA')
7> nofilenamecheck
8> ;
Starting Duplicate Db at 17-Mar-2016 14:27:25
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfiledwdev.ora' auxiliary format
'/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfiledwdev.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfiledwdev.ora''";
}
executing Memory Script
Starting backup at 17-Mar-2016 14:27:25
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/17/2016 14:27:26
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/17/2016 14:27:26
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
RMAN>
Recovery Manager complete.
Now, the aux (destination of the duplicate) does not exist. It only has a skeleton spfile:
oracle:dwdev$ strings $ORACLE_HOME/dbs/spfiledwdev.ora
*.db_name='dwdev'
And just in case internally, as rman needed to restart the aux and (possibly?) created his own net service name from the sid, the tnsnames is as follows:
oracle:dwdev$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
DWDEV6,DWDEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vbdwdev6)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dwdev)
)
)
DWDEV5 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vbdwdev)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dwdev)
)
)
RMCAT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vbrmanprd)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = rmcatvb)
)
)