this is a rac to non-rac dclone
Source(RAC db) – Troy (troy1,troy2) @ol6-112-rac1.localdomain,ol6-112-rac2.localdomain
Target (Single instance) – dup5 @ol6-112-rac1.localdomain
when using spfile option all parameters are copied from the source database. you can override parameetrs by specifiying them in rman block. so make sure you have reveiwed all parameters of sources specially SGA, memory_target sizes , online_log_dest_1/2 etc. and specified their correct values in the rman block as per your requirement.
parameter file
initdup5.ora
db_name=dup5
db_unique_name=dup5
password file
[oracle@ol6-112-rac1 dbs]$ orapwd file=/u01/app/oracle/product/11.2.0.3/db_1/dbs/orapwdup5 password=oracle entries=10
tns entry
TROY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TROY.localdomain)
)
)
DUP5 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-rac1.localdomain)(PORT = 1527))
)
(CONNECT_DATA =
(SERVICE_NAME = DUP5)
)
)
static entry in oracle_home listner.ora
we are using 1527 port so that existing listener is not disturbed. we will trunoff this listener once duplicate is done
[oracle@ol6-112-rac1 admin]$ pwd
/u01/app/oracle/product/11.2.0.3/db_1/network/admin
[oracle@ol6-112-rac1 admin]$ cat listener.ora
SID_LIST_LISTENER1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dup5)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/db_1)
(SID_NAME = dup5)
)
)
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-rac1.localdomain)(PORT = 1527))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
reload the listener
[oracle@ol6-112-rac1 admin]$ lsnrctl status LISTENER1
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 22-JUN-2020 15:44:47
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ol6-112-rac1.localdomain)(PORT=1527)))
STATUS of the LISTENER
------------------------
Alias LISTENER1
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 22-JUN-2020 15:43:49
Uptime 0 days 0 hr. 0 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ol6-112-rac1/listener1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol6-112-rac1.localdomain)(PORT=1527)))
Services Summary...
Service "dup5" has 1 instance(s).
Instance "dup5", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
rman script
Connect target sys/oracle@TROY
connect auxiliary sys/oracle@dup5
run {
Allocate channel c1 device type disk;
allocate auxiliary channel c2 device type disk ;
DUPLICATE TARGET DATABASE to dup5
FROM ACTIVE DATABASE nofilenamecheck
SPFILE
SET DB_name='dup5'
SET DB_UNIQUE_NAME='dup5'
SET CONTROL_FILES = '+DATA'
SET LOG_FILE_NAME_CONVERT = '+DATA', '+DATA'
SET DB_FILE_NAME_CONVERT = '+DATA', '+DATA'
set db_recovery_file_dest_size '1G'
set db_recovery_file_dest='+DATA'
set SGA_TARGET '300M'
SET diagnostic_dest='/u01/app/oracle'
set cluster_database='false'
; }
Documents say that do not use nofilenamecheck if you are cloning the database on the same server otherwise it may overwrite the source files. but if i do not give i receieved this error.
RMAN-05001: auxiliary filename +DATA/dup5/datafile/system.613.1043517817 conflicts with a file used by the target database
so if you are cloning on same server use LOG_FILE_NAME_CONVERT , DB_FILE_NAME_CONVERT, DB_name and DB_UNIQUE_NAME.
since i have OMF in ASM i prefer this way. here some more work you need to do but it is safe.
https://dbatracker.com/2020/05/05/duplicate-database-using-active-database-on-same-server/
start auxiliary db in nomount
[oracle@ol6-112-rac1 dbs]$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jun 19 18:00:31 2020
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to an idle instance.
dup5@ol6-112-rac1 > startup nomount pfile='/u01/app/oracle/product/11.2.0.3/db_1/dbs/initdup5.ora'
ORACLE instance started.
Total System Global Area 238034944 bytes
Fixed Size 2227136 bytes
Variable Size 180356160 bytes
Database Buffers 50331648 bytes
Redo Buffers 5120000 bytes
dup5@ol6-112-rac1 > exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
run duplicate
[oracle@ol6-112-rac1 dbs]$ rman
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Jun 19 18:00:39 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> Connect target sys/oracle@TROY
connect auxiliary sys/oracle@dup5
connected to target database: TROY (DBID=4201044407)
RMAN>
connected to auxiliary database: DUP5 (not mounted)
RMAN> run {
Allocate channel c1 device type disk;
allocate auxiliary channel c2 device type disk ;
DUPLICATE TARGET DATABASE to dup5
FROM ACTIVE DATABASE nofilenamecheck
SPFILE
SET DB_name='dup5'
SET DB_UNIQUE_NAME='dup5'
SET CONTROL_FILES = '+DATA'
SET LOG_FILE_NAME_CONVERT = '+DATA', '+DATA'
SET DB_FILE_NAME_CONVERT = '+DATA', '+DATA'
set db_recovery_file_dest_size '1G'
set db_recovery_file_dest='+DATA'
set SGA_TARGET '300M'
SET diagnostic_dest='/u01/app/oracle'
set cluster_database='false'
; }2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17>
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=29 instance=TROY1 device type=DISK
allocated channel: c2
channel c2: SID=25 device type=DISK
Starting Duplicate Db at 19-JUN-20
contents of Memory Script:
{
backup as copy reuse
targetfile '+DATA/troy/spfiletroy.ora' auxiliary format
'/u01/app/oracle/product/11.2.0.3/db_1/dbs/spfiledup5.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0.3/db_1/dbs/spfiledup5.ora''";
}
executing Memory Script
Starting backup at 19-JUN-20
Finished backup at 19-JUN-20
sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0.3/db_1/dbs/spfiledup5.ora''
contents of Memory Script:
{
sql clone "alter system set db_name =
''DUP5'' comment=
''duplicate'' scope=spfile";
sql clone "alter system set db_name =
''dup5'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''dup5'' comment=
'''' scope=spfile";
sql clone "alter system set CONTROL_FILES =
''+DATA'' comment=
'''' scope=spfile";
sql clone "alter system set LOG_FILE_NAME_CONVERT =
''+DATA'', ''+DATA'' comment=
'''' scope=spfile";
sql clone "alter system set db_file_name_convert =
''+DATA'', ''+DATA'' comment=
'''' scope=spfile";
sql clone "alter system set db_recovery_file_dest_size =
1G comment=
'''' scope=spfile";
sql clone "alter system set db_recovery_file_dest =
''+DATA'' comment=
'''' scope=spfile";
sql clone "alter system set SGA_TARGET =
300M comment=
'''' scope=spfile";
sql clone "alter system set diagnostic_dest =
''/u01/app/oracle'' comment=
'''' scope=spfile";
sql clone "alter system set cluster_database =
false comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
sql statement: alter system set db_name = ''DUP5'' comment= ''duplicate'' scope=spfile
sql statement: alter system set db_name = ''dup5'' comment= '''' scope=spfile
sql statement: alter system set db_unique_name = ''dup5'' comment= '''' scope=spfile
sql statement: alter system set CONTROL_FILES = ''+DATA'' comment= '''' scope=spfile
sql statement: alter system set LOG_FILE_NAME_CONVERT = ''+DATA'', ''+DATA'' comment= '''' scope=spfile
sql statement: alter system set db_file_name_convert = ''+DATA'', ''+DATA'' comment= '''' scope=spfile
sql statement: alter system set db_recovery_file_dest_size = 1G comment= '''' scope=spfile
sql statement: alter system set db_recovery_file_dest = ''+DATA'' comment= '''' scope=spfile
sql statement: alter system set SGA_TARGET = 300M comment= '''' scope=spfile
sql statement: alter system set diagnostic_dest = ''/u01/app/oracle'' comment= '''' scope=spfile
sql statement: alter system set cluster_database = false comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 427820376 bytes
Database Buffers 192937984 bytes
Redo Buffers 3338240 bytes
allocated channel: c2
channel c2: SID=31 device type=DISK
contents of Memory Script:
{
sql clone "alter system set control_files =
''+DATA/dup5/controlfile/current.611.1043517675'' comment=
''Set by RMAN'' scope=spfile";
sql clone "alter system set db_name =
''TROY'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''DUP5'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format '+DATA/dup5/controlfile/current.612.1043517675';
sql clone "alter system set control_files =
''+DATA/dup5/controlfile/current.612.1043517675'' comment=
''Set by RMAN'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
alter clone database mount;
}
executing Memory Script
sql statement: alter system set control_files = ''+DATA/dup5/controlfile/current.611.1043517675'' comment= ''Set by RMAN'' scope=spfile
sql statement: alter system set db_name = ''TROY'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''DUP5'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 427820376 bytes
Database Buffers 192937984 bytes
Redo Buffers 3338240 bytes
allocated channel: c2
channel c2: SID=30 device type=DISK
Starting backup at 19-JUN-20
channel c1: starting datafile copy
copying current control file
output file name=/u01/app/oracle/product/11.2.0.3/db_1/dbs/snapcf_TROY1.f tag=TAG20200619T180221 RECID=8 STAMP=1043517742
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 19-JUN-20
sql statement: alter system set control_files = ''+DATA/dup5/controlfile/current.612.1043517675'' comment= ''Set by RMAN'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 427820376 bytes
Database Buffers 192937984 bytes
Redo Buffers 3338240 bytes
allocated channel: c2
channel c2: SID=30 device type=DISK
database mounted
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
contents of Memory Script:
{
set newname for datafile 1 to
"+data";
set newname for datafile 2 to
"+data";
set newname for datafile 3 to
"+data";
set newname for datafile 4 to
"+data";
set newname for datafile 5 to
"+data";
set newname for datafile 6 to
"+data";
backup as copy reuse
datafile 1 auxiliary format
"+data" datafile
2 auxiliary format
"+data" datafile
3 auxiliary format
"+data" datafile
4 auxiliary format
"+data" datafile
5 auxiliary format
"+data" datafile
6 auxiliary format
"+data" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 19-JUN-20
channel c1: starting datafile copy
input datafile file number=00001 name=+DATA/troy/datafile/system.256.1040416307
output file name=+DATA/dup5/datafile/system.613.1043517817 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:04
channel c1: starting datafile copy
input datafile file number=00002 name=+DATA/troy/datafile/sysaux.257.1040416309
output file name=+DATA/dup5/datafile/sysaux.614.1043517821 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:03
channel c1: starting datafile copy
input datafile file number=00005 name=+DATA/troy/datafile/example.264.1040416383
output file name=+DATA/dup5/datafile/example.615.1043517823 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:02
channel c1: starting datafile copy
input datafile file number=00003 name=+DATA/troy/datafile/undotbs1.258.1040416309
output file name=+DATA/dup5/datafile/undotbs1.616.1043517825 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:01
channel c1: starting datafile copy
input datafile file number=00006 name=+DATA/troy/datafile/undotbs2.265.1040416497
output file name=+DATA/dup5/datafile/undotbs2.617.1043517827 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:01
channel c1: starting datafile copy
input datafile file number=00004 name=+DATA/troy/datafile/users.259.1040416309
output file name=+DATA/dup5/datafile/users.618.1043517829 tag=TAG20200619T180336
channel c1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 19-JUN-20
sql statement: alter system archive log current
contents of Memory Script:
{
backup as copy reuse
archivelog like "+DATA/troy/archivelog/2020_06_19/thread_1_seq_181.608.1043512607" auxiliary format
"+DATA" archivelog like
"+DATA/troy/archivelog/2020_06_19/thread_1_seq_182.619.1043517829" auxiliary format
"+DATA" archivelog like
"+DATA/troy/archivelog/2020_06_19/thread_2_seq_165.620.1043517831" auxiliary format
"+DATA" ;
catalog clone start with "+DATA";
switch clone datafile all;
}
executing Memory Script
Starting backup at 19-JUN-20
channel c1: starting archived log copy
input archived log thread=1 sequence=181 RECID=473 STAMP=1043512607
output file name=+DATA/dup5/archivelog/2020_06_19/thread_1_seq_181.621.1043517837 RECID=0 STAMP=0
channel c1: archived log copy complete, elapsed time: 00:00:02
channel c1: starting archived log copy
input archived log thread=1 sequence=182 RECID=474 STAMP=1043517829
output file name=+DATA/dup5/archivelog/2020_06_19/thread_1_seq_182.622.1043517839 RECID=0 STAMP=0
channel c1: archived log copy complete, elapsed time: 00:00:01
channel c1: starting archived log copy
input archived log thread=2 sequence=165 RECID=475 STAMP=1043517831
output file name=+DATA/dup5/archivelog/2020_06_19/thread_2_seq_165.623.1043517841 RECID=0 STAMP=0
channel c1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 19-JUN-20
searching for all files that match the pattern +DATA
List of Files Unknown to the Database
=====================================
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_1_seq_181.621.1043517837
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_1_seq_182.622.1043517839
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_2_seq_165.623.1043517841
File Name: +data/DUP5/DATAFILE/SYSTEM.613.1043517817
File Name: +data/DUP5/DATAFILE/SYSAUX.614.1043517821
File Name: +data/DUP5/DATAFILE/EXAMPLE.615.1043517823
File Name: +data/DUP5/DATAFILE/UNDOTBS1.616.1043517825
File Name: +data/DUP5/DATAFILE/UNDOTBS2.617.1043517827
File Name: +data/DUP5/DATAFILE/USERS.618.1043517829
File Name: +data/DUP5/CONTROLFILE/Current.609.1043516207
File Name: +data/DUP5/CONTROLFILE/Current.610.1043516207
File Name: +data/DUP5/CONTROLFILE/Current.611.1043517675
File Name: +data/DB_UNKNOWN/PARAMETERFILE/SPFILE.268.1041586177
File Name: +data/TROY/ARCHIVELOG/2020_06_19/thread_1_seq_182.619.1043517829
File Name: +data/TROY/ARCHIVELOG/2020_06_19/thread_2_seq_165.620.1043517831
File Name: +data/TROY/DATAGUARDCONFIG/TROY.386.1041699463
File Name: +data/TROY/DATAGUARDCONFIG/TROY.387.1041699481
File Name: +data/TROY/CONTROLFILE/Current.260.1040416375
File Name: +data/ol6-112-scan/OCRFILE/REGISTRY.255.1040405589
File Name: +data/ol6-112-scan/ASMPARAMETERFILE/REGISTRY.253.1040405587
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_1_seq_181.621.1043517837
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_1_seq_182.622.1043517839
File Name: +data/DUP5/ARCHIVELOG/2020_06_19/thread_2_seq_165.623.1043517841
File Name: +data/DUP5/DATAFILE/SYSTEM.613.1043517817
File Name: +data/DUP5/DATAFILE/SYSAUX.614.1043517821
File Name: +data/DUP5/DATAFILE/EXAMPLE.615.1043517823
File Name: +data/DUP5/DATAFILE/UNDOTBS1.616.1043517825
File Name: +data/DUP5/DATAFILE/UNDOTBS2.617.1043517827
File Name: +data/DUP5/DATAFILE/USERS.618.1043517829
File Name: +data/DUP5/CONTROLFILE/Current.610.1043516207
File Name: +data/TROY/ARCHIVELOG/2020_06_19/thread_1_seq_182.619.1043517829
File Name: +data/TROY/ARCHIVELOG/2020_06_19/thread_2_seq_165.620.1043517831
List of Files Which Where Not Cataloged
=======================================
File Name: +data/DUP5/CONTROLFILE/Current.609.1043516207
RMAN-07517: Reason: The file header is corrupted
File Name: +data/DUP5/CONTROLFILE/Current.611.1043517675
RMAN-07517: Reason: The file header is corrupted
File Name: +data/DB_UNKNOWN/PARAMETERFILE/SPFILE.268.1041586177
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:
File Name: +data/TROY/DATAGUARDCONFIG/TROY.386.1041699463
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:
File Name: +data/TROY/DATAGUARDCONFIG/TROY.387.1041699481
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:
File Name: +data/TROY/CONTROLFILE/Current.260.1040416375
RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +data/ol6-112-scan/OCRFILE/REGISTRY.255.1040405589
RMAN-07517: Reason: The file header is corrupted
File Name: +data/ol6-112-scan/ASMPARAMETERFILE/REGISTRY.253.1040405587
RMAN-07518: Reason: Foreign database file DBID: 0 Database Name:
datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=1043517842 file name=+DATA/dup5/datafile/system.613.1043517817
datafile 2 switched to datafile copy
input datafile copy RECID=16 STAMP=1043517842 file name=+DATA/dup5/datafile/sysaux.614.1043517821
datafile 3 switched to datafile copy
input datafile copy RECID=17 STAMP=1043517842 file name=+DATA/dup5/datafile/undotbs1.616.1043517825
datafile 4 switched to datafile copy
input datafile copy RECID=18 STAMP=1043517842 file name=+DATA/dup5/datafile/users.618.1043517829
datafile 5 switched to datafile copy
input datafile copy RECID=19 STAMP=1043517842 file name=+DATA/dup5/datafile/example.615.1043517823
datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=1043517842 file name=+DATA/dup5/datafile/undotbs2.617.1043517827
contents of Memory Script:
{
set until scn 2950564;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 19-JUN-20
starting media recovery
archived log for thread 1 with sequence 182 is already on disk as file +DATA/dup5/archivelog/2020_06_19/thread_1_seq_182.622.1043517839
archived log for thread 2 with sequence 165 is already on disk as file +DATA/dup5/archivelog/2020_06_19/thread_2_seq_165.623.1043517841
archived log file name=+DATA/dup5/archivelog/2020_06_19/thread_1_seq_182.622.1043517839 thread=1 sequence=182
archived log file name=+DATA/dup5/archivelog/2020_06_19/thread_2_seq_165.623.1043517841 thread=2 sequence=165
media recovery complete, elapsed time: 00:00:00
Finished recover at 19-JUN-20
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 432014680 bytes
Database Buffers 188743680 bytes
Redo Buffers 3338240 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''DUP5'' comment=
''Reset to original value by RMAN'' scope=spfile";
sql clone "alter system reset db_unique_name scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set db_name = ''DUP5'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 432014680 bytes
Database Buffers 188743680 bytes
Redo Buffers 3338240 bytes
allocated channel: c2
channel c2: SID=30 device type=DISK
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP5" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '+data' ) SIZE 50 M REUSE,
GROUP 2 ( '+data' ) SIZE 50 M REUSE
DATAFILE
'+DATA/dup5/datafile/system.613.1043517817'
CHARACTER SET AL32UTF8
sql statement: ALTER DATABASE ADD LOGFILE
INSTANCE 'i2'
GROUP 3 ( '+data' ) SIZE 50 M REUSE,
GROUP 4 ( '+data' ) SIZE 50 M REUSE
contents of Memory Script:
{
set newname for tempfile 1 to
"+data";
switch clone tempfile all;
catalog clone datafilecopy "+DATA/dup5/datafile/sysaux.614.1043517821",
"+DATA/dup5/datafile/undotbs1.616.1043517825",
"+DATA/dup5/datafile/users.618.1043517829",
"+DATA/dup5/datafile/example.615.1043517823",
"+DATA/dup5/datafile/undotbs2.617.1043517827";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +data in control file
cataloged datafile copy
datafile copy file name=+DATA/dup5/datafile/sysaux.614.1043517821 RECID=1 STAMP=1043517921
cataloged datafile copy
datafile copy file name=+DATA/dup5/datafile/undotbs1.616.1043517825 RECID=2 STAMP=1043517921
cataloged datafile copy
datafile copy file name=+DATA/dup5/datafile/users.618.1043517829 RECID=3 STAMP=1043517921
cataloged datafile copy
datafile copy file name=+DATA/dup5/datafile/example.615.1043517823 RECID=4 STAMP=1043517921
cataloged datafile copy
datafile copy file name=+DATA/dup5/datafile/undotbs2.617.1043517827 RECID=5 STAMP=1043517921
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=1043517921 file name=+DATA/dup5/datafile/sysaux.614.1043517821
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=1043517921 file name=+DATA/dup5/datafile/undotbs1.616.1043517825
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=1043517921 file name=+DATA/dup5/datafile/users.618.1043517829
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=1043517921 file name=+DATA/dup5/datafile/example.615.1043517823
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=1043517921 file name=+DATA/dup5/datafile/undotbs2.617.1043517827
Reenabling controlfile options for auxiliary database
Executing: alter database force logging
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 19-JUN-20
released channel: c1
released channel: c2
RMAN> exit
Recovery Manager complete.
[oracle@ol6-112-rac1 dbs]$
dup5 automatically registered in grid listener
[oracle@ol6-112-rac1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 19-JUN-2020 18:19:25
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 19-JUN-2020 16:31:25
Uptime 0 days 1 hr. 47 min. 59 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0.3/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ol6-112-rac1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.43.101)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.43.103)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "DUP5.localdomain" has 1 instance(s).
Instance "dup5", status READY, has 1 handler(s) for this service...
Service "TROY.localdomain" has 1 instance(s).
Instance "TROY1", status READY, has 1 handler(s) for this service...
Service "TROYXDB.localdomain" has 2 instance(s).
Instance "TROY1", status READY, has 1 handler(s) for this service...
Instance "dup5", status READY, has 1 handler(s) for this service...
Service "TROY_DGB.localdomain" has 1 instance(s).
Instance "TROY1", status READY, has 1 handler(s) for this service...
Service "TROY_DGMGRL.localdomain" has 1 instance(s).
Instance "TROY1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
after duplicate just verify that dup5 database spfile does’t have any TROY db parameters present otherwise you need to manual cleanup and recreate spfile