Environment Details:
[n00.test.alinafe.net:oracle:+ASM1:$dbs]: asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 2584572 708515 0 708515 0 N BACKUP/
MOUNTED EXTERN N 512 4096 1048576 1542138 1508654 0 1508654 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 5242877 1704683 0 1704683 0 N PROD_DATA/
MOUNTED NORMAL N 512 4096 1048576 4094 3498 0 1749 0 Y TESTDC_OCR/
MOUNTED EXTERN N 512 4096 1048576 511999 479061 0 479061 0 N TESTRAC00/
MOUNTED EXTERN N 512 4096 1048576 1023999 925908 0 925908 0 N TANFAST/
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 921597 921220 0 921220 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 1023998 1023891 0 1023891 0 N TEST_ARCHIVE/
MOUNTED EXTERN N 512 4096 1048576 1023998 1023647 0 1023647 0 N TEST_PRODDATA/
MOUNTED EXTERN N 512 4096 1048576 4194300 4143388 0 4143388 0 N TEST_TAN/
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]:
[n00.test.alinafe.net:oracle:TEST1200:$dbs]: srvctl config scan
SCAN name: TESTdc-scan, Network: 1
Subnet IPv4: 192.168.196.0/255.255.255.0/eth0, static
Subnet IPv6:
SCAN 0 IPv4 VIP: …….
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 1 IPv4 VIP: …….
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 2 IPv4 VIP: ……
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
[oracle-n00.test.alinafe.net:oracle:TESTDB1:$dbs]: srvctl config scan
SCAN name: oracle-test-scan, Network: 1
Subnet IPv4: ………/255.255.255.0/eth0, static
Subnet IPv6:
SCAN 0 IPv4 VIP: ……….
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 1 IPv4 VIP: ……..
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
SCAN 2 IPv4 VIP: ……..
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
[n00.test.alinafe.net:oracle:TEST1200:$dbs]: srvctl config nodeapps
Network 1 exists
Subnet IPv4: ……../255.255.255.0/eth0, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node d00
VIP Name: n00-vip
VIP IPv4 Address: …….
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node d01
VIP Name: n01-vip
VIP IPv4 Address: ………
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false
ONS is enabled
ONS is individually enabled on nodes:
ONS is individually disabled on nodes:
[oracle-n00.test.alinafe.net:oracle:TESTDB1:$dbs]: srvctl config nodeapps
Network 1 exists
Subnet IPv4: ……./255.255.255.0/eth0, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node oracle-test00
VIP Name: oracle-n00-vip
VIP IPv4 Address: ……..
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node oracle-test01
VIP Name: oracle-n01-vip
VIP IPv4 Address: ……….
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false
ONS is enabled
ONS is individually enabled on nodes:
ONS is individually disabled on nodes:
PRIMARY SERVER
n00.test.alinafe.net ;n01.test.alinafe.net
12c ASM Grid and Oralce 12 12.1.0.2.0 Binaries
db_name TEST12C
db_unique_name TEST12C_Japan
instance_name TEST1200
SECONDARY SERVER
oracle-n00.test.alinafe.net;oracle-n01.test.alinafe.net
db_name ORATS12C
db_unique_name ORATS12C_Japan
instance_name ORATS1200
Step 1:
Copy the password file from Target database to auxiliary database location and rename it.
scp orapwtest1200 oracle@oracle-n00.test.alinafe.net:/u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapworats1200
Step 2:
Create the pfile from target database for Auxilarydatabase( if target has spfile create pfile from spfile)
n00.test.alinafe.net:oracle:TEST1200:$dbs]: sp
sys@TEST12C> create pfile from spfile;
File created.
sys@TEST12C> exit
[n00.test.alinafe.net:oracle:TEST1200:$dbs]: ls -ltr
total 3224
………..
-rw-r—– 1 oracle oinstall 3521 Jul 30 13:55 initTEST1200.ora
-rw-rw—- 1 oracle oinstall 524288 Jul 30 13:55 id_TEST1200.dat
[n00.test.alinafe.net:oracle:TEST1200:$dbs]: mv initTEST1200.ora initORATS1200.ora
[n00.test.alinafe.net:oracle:TEST1200:$dbs]: scp initORATS1200.ora oracle@oracle-n00.test.alinafe.net:/u01/app/oracle/product/12.1.0/dbhome_1/dbs/
[oracle-n00.test.alinafe.net:oracle:TestDB1:$dbs]: ls -ltr
total 12
-rw-r—– 1 oracle oinstall 8192 Jul 30 13:54 orapwORATS1200
-rw-r—– 1 oracle oinstall 3521 Jul 30 13:57 initORATS1200.ora
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: mkdir -p /home/oracle/admin/ORATS1200/cdump
[oracle-n01.test.alinafe.net:oracle:TestDB2:$~]: mkdir -p /home/oracle/admin/ORATS1201/cdump
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: mkdir -p /u01/app/oracle/admin/ORATS12C_JAPAN
[oracle-n01.test.alinafe.net:oracle:TestDB2:$~]: mkdir -p /u01/app/oracle/admin/ORATS12C_JAPAN
[oracle-n00.test.alinafe.net:oracle:TestDB1:$dbs]: vi initORATS1200.ora
#ORATS1201.__data_transfer_cache_size=0
ORATS1200.__data_transfer_cache_size=0
#ORATS1201.__db_cache_size=5838471168
ORATS1200.__db_cache_size=12079595520
#ORATS1201.__java_pool_size=134217728
ORATS1200.__java_pool_size=134217728
#ORATS1201.__large_pool_size=134217728
ORATS1200.__large_pool_size=134217728
ORATS1200.__oracle_base=’/u01/app/oracle’#ORACLE_BASE set from environment
#ORATS1201.__oracle_base=’/u01/app/oracle’#ORACLE_BASE set from environment
#ORATS1201.__pga_aggregate_target=1073741824
ORATS1200.__pga_aggregate_target=1073741824
#ORATS1201.__sga_target=14294188032
ORATS1200.__sga_target=21005074432
#ORATS1201.__shared_io_pool_size=536870912
ORATS1200.__shared_io_pool_size=536870912
#ORATS1201.__shared_pool_size=7449083904
ORATS1200.__shared_pool_size=7918845952
#ORATS1201.__streams_pool_size=134217728
ORATS1200.__streams_pool_size=134217728
*.audit_file_dest=’/u01/app/oracle/admin/ORATS12C_JAPAN’
*.cluster_database=false
*.cluster_database_instances=1
*.control_files=’+DATA/ORATS12C_JAPAN/CONTROLFILE/controlfile01.ora’,’+TEST_ARCHIVE/ORATS12C_JAPAN/CONTROLFILE/controlfile02.ora’,’+TEST_PRODDATA/ORATS12C_JAPAN/CONTROLFILE/controlfile03.ora’
*.db_create_file_dest=’+TEST_TAN’
*.db_create_online_log_dest_1=’+TEST_TAN’
*.db_file_name_convert=’+BACKUP/TEST12c_japan’,’+TEST_TAN/ORATS12C_JAPAN’,’+TANFAST/TEST_JAPAN’,’+TEST_TAN/ORATS12C_JAPAN’
*.db_name=’ORATS12C’
*.db_recovery_file_dest=’+TEST_ARCHIVE’
*.db_recovery_file_dest_size=214748364800
*.db_unique_name=’ORATS12C_JAPAN’
*.diagnostic_dest=’/u01/app/oracle’
ORATS1200.instance_name=’ORATS1200′
#ORATS1201.instance_name=’ORATS1201′
ORATS1200.instance_number=1
#ORATS1201.instance_number=2
*.java_pool_size=134217728
*.job_queue_processes=10
*.large_pool_size=117440512
#ORATS1201.local_listener='(address=(protocol=tcp)(host=oracle-n01-vip)(port=1521))’
ORATS1200.local_listener='(address=(protocol=tcp)(host=oracle-n00-vip)(port=1521))’
*.log_file_name_convert=’+BACKUP/TEST12C_JAPAN’,’+TEST_TAN/ORATS12C_JAPAN’
*.processes=1000
*.remote_listener=’oracle-test-scan.test.alinafe.net:1521′,’oracle-test-scan:1521′
*.service_names=’ORATS12C’
ORATS1200.sga_max_size=31457280000#internally adjusted
*.sga_target=12884901888
#ORATS1201.sga_target=14260633600
ORATS1200.sga_target=21005074432
*.shared_pool_size=1358954496
*.sort_area_size=102400
*.streams_pool_size=117440512
ORATS1200.thread=1
#ORATS1201.thread=2
*.timed_statistics=TRUE
*.undo_management=’AUTO’
*.undo_retention=1800
ORATS1200.undo_tablespace=’UNDOTBS1′
#ORATS1201.undo_tablespace=’UNDOTBS2′
Step 3:
Configure the listener & tnsnames on both target database and auxiliary database.
Egs:
Tnsnames entries:
TEST1200 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = n00-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = n00-vip)(PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST = n00-vip)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TEST12C)
(INSTANCE_NAME = TEST1200)
)
)
#Clone Database Parameters
ORATS1200 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-n00-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-test-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED
(SID_NAME = ORATS1200)
)
)
ORATS1201 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-n01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-test-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID_NAME = ORATS1201)
)
)
Step 4:
Create the required directory structure in Auxiliarydb location (based on pfile).
Step 5:
Open the Auxiliary database in Nomount state. Created spfile from pfile and again shutdown the auxiliary database and brought up to Nomount state using spfile.
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: ls
initORATS1200.ora orapwORATS1200
[oracle-n00.test.alinafe.net:oracle:+ASM1:$admin]: export ORACLE_SID=ORATS1200
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: sp
Connected to an idle instance.
idle> startup nomount;
ORACLE instance started.
Total System Global Area 3.1474E+10 bytes
Fixed Size 2942880 bytes
Variable Size 1.8790E+10 bytes
Database Buffers 1.2616E+10 bytes
Redo Buffers 64163840 bytes
idle>
SQL> create spfile from pfile;
File created.
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: 12c
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: export ORACLE_SID=ORATS1200
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]:
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
idle> startup nomount;
ORACLE instance started.
Total System Global Area 3.1474E+10 bytes
Fixed Size 2942880 bytes
Variable Size 1.8790E+10 bytes
Database Buffers 1.2616E+10 bytes
Redo Buffers 64163840 bytes
idle> show parameter spfile;
NAME TYPE VALUE
——————————- ———– ————————–
spfile string /u01/app/oracle/product/12.1./dbhome_1/dbs/spfileORATS1200.ora
idle> exit
Step 6:
Go to the Target Database server and enter in to the RMAN prompt. Issue the below command to duplicate the Target database to auxiliary database.
[n00.test.alinafe.net:oracle:TEST1200:$admin]: tnsping orats1200
TNS Ping Utility for Linux: Version 12.1.0.2.0 – Production on 30-JUL-2016 21:37:10
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/12.1.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-n00-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-test-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = ORATS1200)))
OK (10 msec)
[n00.test.alinafe.net:oracle:TEST1200:$admin]: rman target sys/******* auxiliary sys/*******@ORATS1200
Recovery Manager: Release 12.1.0.2.0 – Production on Sun Jul 31 01:29:07 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: TEST12C (DBID=486976613)
connected to auxiliary database: ORATS12C (not mounted)
RMAN> duplicate target database to orats12C from active database nofilenamecheck;
Starting Duplicate Db at 31-07-16 01:30:08
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1146 device type=DISK
current log archived
contents of Memory Script:
{
sql clone “alter system set db_name =
”TEST12C” comment=
”Modified by RMAN duplicate” scope=spfile”;
shutdown clone immediate;
startup clone force nomount
backup as copy current controlfile auxiliary format ‘+DATA/ORATS12C_JAPAN/controlfile01.ora’;
restore clone primary controlfile to ‘+TEST_ARCHIVE/ORATS12C_JAPAN/controlfile02.ora’ from
‘+DATA/ORATS12C_JAPAN/controlfile01.ora’;
restore clone primary controlfile to ‘+TEST_PRODDATA/ORATS12C_JAPAN/controlfile03.ora’ from
‘+DATA/ORATS12C_JAPAN/controlfile01.ora’;
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ”TEST12C” comment= ”Modified by RMAN duplicate” scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 31474057216 bytes
Fixed Size 2942880 bytes
Variable Size 18790484064 bytes
Database Buffers 12616466432 bytes
Redo Buffers 64163840 bytes
Starting backup at 31-07-16 01:33:18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 instance=TEST1200 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/ORATS12C_JAPAN/controlfile01.ora tag=TAG20160731T013319
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 31-07-16 01:33:25
Starting restore at 31-07-16 01:33:26
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1146 device type=DISK
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 31-07-16 01:33:34
Starting restore at 31-07-16 01:33:34
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 31-07-16 01:33:37
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
“+TEST_TAN”;
……………………
36 auxiliary format
“+TEST_TAN” ;
sql ‘alter system archive log current’;
}
executing Memory Script
executing command: SET NEWNAME
……………………….
executing command: SET NEWNAME
Starting backup at 31-07-16 01:34:24
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
………………………………
…………………………
Finished backup at 31-07-16 02:49:09
sql statement: alter system archive log current
current log archived
contents of Memory Script:
{
backup as copy reuse
archivelog like “+BACKUP/TEST12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11631.275.918610213” auxiliary format
“+TEST_ARCHIVE” archivelog like
“+BACKUP/TEST12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11632.485.918611431″ auxiliary ……………./2016_07_31/thread_2_seq_11595.1242.918614955” auxiliary format
“+TEST_ARCHIVE” ;
catalog clone start with “+TEST_ARCHIVE”;
switch clone datafile all;
}
executing Memory Script
Starting backup at 31-07-16 02:51:41
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11632 RECID=23220 STAMP=918611431
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11632.341.918615105 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11634 RECID=23223 STAMP=918613650
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11634.426.918615107 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11633 RECID=23221 STAMP=918612413
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11633.415.918615111 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11635 RECID=23224 STAMP=918614450
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11635.339.918615115 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11631 RECID=23219 STAMP=918610213
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11631.342.918615117 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11637 RECID=23230 STAMP=918614950
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11637.338.918615121 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11589 RECID=23222 STAMP=918612408
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11589.343.918615123 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11638 RECID=23232 STAMP=918614956
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11638.314.918615123 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11590 RECID=23225 STAMP=918614447
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11590.313.918615125 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11594 RECID=23231 STAMP=918614946
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11594.312.918615127 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=11636 RECID=23229 STAMP=918614458
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11636.311.918615127 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11595 RECID=23233 STAMP=918614955
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11595.310.918615129 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11591 RECID=23226 STAMP=918614449
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11591.309.918615135 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11593 RECID=23228 STAMP=918614451
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11593.417.918615137 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=11592 RECID=23227 STAMP=918614450
output file name=+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_2_seq_11592.398.918615139 RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 31-07-16 02:52:23
searching for all files that match the pattern +TEST_ARCHIVE
List of Files Unknown to the Database
=====================================
File Name: +TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11625.325.918608729
File Name: +TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11626.747.918608733
…………………..
+TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_30/thread_1_seq_11622.328.918602773
cataloging files…
cataloging done
List of Cataloged Files
=======================
File Name: +TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_31/thread_1_seq_11625.325.918608729
………………………………….
File Name: +TEST_ARCHIVE/ORATS12C_JAPAN/ARCHIVELOG/2016_07_30/thread_1_seq_11622.328.918602773
datafile 1 switched to datafile copy
input datafile copy RECID=36 STAMP=918615157 file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/system.283.918612267
datafile 2 switched to datafile copy
input datafile copy RECID=37 STAMP=918615174 file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/ts_undo.896.918614887
datafile 3 switched to datafile copy
input datafile copy RECID=38 STAMP=918615191 file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/archive.911.918614349
datafile 4 switched to datafile copy
input datafile copy RECID=39 STAMP=918615204 file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/TAN.474.918610673
datafile 5 switched to datafile copy
input datafile copy RECID=40 STAMP=918615226 file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/somedata.917.918613851
datafile 6 switched to datafile copy
…………………………….
contents of Memory Script:
{
set until scn 43862291989;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 31-07-16 03:05:10
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 11632 is already on disk as file
…………………
media recovery complete, elapsed time: 00:00:09
Finished recover at 31-07-16 03:05:27
Oracle instance started
Total System Global Area 31474057216 bytes
Fixed Size 2942880 bytes
Variable Size 18790484064 bytes
Database Buffers 12616466432 bytes
Redo Buffers 64163840 bytes
contents of Memory Script:
{
sql clone “alter system set db_name =
”ORATS12C” comment=
”Reset to original value by RMAN” scope=spfile”;
}
executing Memory Script
sql statement: alter system set db_name = ”ORATS12C” comment= ”Reset to original value by RMAN” scope=spfile
Oracle instance started
Total System Global Area 31474057216 bytes
Fixed Size 2942880 bytes
Variable Size 18790484064 bytes
Database Buffers 12616466432 bytes
Redo Buffers 64163840 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE “ORATS12C” RESETLOGS ARCHIVELOG
MAXLOGFILES 315
MAXLOGMEMBERS 2
MAXDATAFILES 60
MAXINSTANCES 63
MAXLOGHISTORY 65732
LOGFILE
GROUP 4 ( ‘+TEST_TAN’ ) SIZE 100 M REUSE,
GROUP 6 ( ‘+TEST_TAN’ ) SIZE 100 M REUSE
DATAFILE
‘+TEST_TAN/ORATS12C_JAPAN/DATAFILE/system.283.918612267’
CHARACTER SET WE8ISO8859P1
sql statement: ALTER DATABASE ADD LOGFILE
INSTANCE ‘i2’
GROUP 1 ( ‘+TEST_TAN’ ) SIZE 100 M REUSE,
GROUP 2 ( ‘+TEST_TAN’ ) SIZE 100 M REUSE
contents of Memory Script:
{
set newname for tempfile 1 to
“+TEST_TAN”;
switch clone tempfile all;
catalog clone datafilecopy “+TEST_TAN/ORATS12C_JAPAN/DATAFILE/ts_undo.896.918614887”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/archive.911.918614349”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/TAN.474.918610673”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/somedata.917.918613851”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/ts_undo.465.918611049”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/TAN.449.918611425”,
“+TEST_TAN/ORATS12C_JAPAN/DATAFILE/sysaux.906.918614705”,
……………………………..
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +TEST_TAN in control file
cataloged datafile copy
datafile copy file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/ts_undo.896.918614887 RECID=1 STAMP=918615980
cataloged datafile copy
datafile copy file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/archive.911.918614349 RECID=2 STAMP=918615980
cataloged datafile copy
datafile copy file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/TAN.474.918610673 RECID=3 STAMP=918615980
cataloged datafile copy
datafile copy file name=+TEST_TAN/ORATS12C_JAPAN/DATAFILE/somedata.917.918613851 RECID=4 STAMP=918615980
cataloged datafile copy
…………………………………
Executing: alter database force logging
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 31-07-16 03:06:45
Step 7:
Check the status of the cloned database.
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: sp
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jul 31 03:09:49 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
sys@ORATS12C> select name,db_unique_name,database_role,dbid from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE DBID
——— —————————— —————- ———-
ORATS12C ORATS12C_JAPAN PRIMARY 3292324836
VERIFICATIONS:
- Check the DBID of both the databases TEST12C and ORATS12C. It will be different.
Primary Database – TEST12C
[n00.test.alinafe.net:oracle:TEST1200:$admin]: sp
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jul 31 03:10:22 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
sys@TEST12C> select name,db_unique_name,database_role,dbid from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE DBID
——— —————————— —————- ———-
TEST12C TEST12C_Japan PRIMARY 486976613
Clone Database – ORATS12C
sys@ORATS12C> select name,db_unique_name,database_role,dbid from v$database;
NAME DB_UNIQUE_NAME DATABASE_ROLE DBID
——— —————————— —————- ———-
ORATS12C ORATS12C_JAPAN PRIMARY 3292324836
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: sp
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jul 31 03:18:37 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
sys@ORATS12C> create pfile from spfile;
File created.
oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: sp
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jul 31 03:28:14 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
idle> startup
ORACLE instance started.
Total System Global Area 3.1474E+10 bytes
Fixed Size 2942880 bytes
Variable Size 1.8790E+10 bytes
Database Buffers 1.2616E+10 bytes
Redo Buffers 64163840 bytes
Database mounted.
Database opened.
idle> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
real 0m47.722s
user 0m0.022s
sys 0m0.056s
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: sftp oracle-test01
Connecting to oracle-test01…
sftp> cd /u01/app/oracle/product/12.1.0/dbhome_1/dbs
sftp> put initORATS1200.ora.post_clone_to_rac initORATS1201.ora
Uploading initORATS1200.ora.post_clone_to_rac to /u01/app/oracle/product/12.1.0/dbhome_1/dbs/initORATS1201.ora
initORATS1200.ora.post_clone_to_rac 100% 3612 3.5KB/s 00:00
sftp>
oracle-n01.test.alinafe.net:oracle:ORATS1201:$dbs]: sp
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jul 31 03:34:37 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
idle> startup
ORACLE instance started.
Total System Global Area 3.1474E+10 bytes
Fixed Size 2942880 bytes
Variable Size 1.8790E+10 bytes
Database Buffers 1.2616E+10 bytes
Redo Buffers 64163840 bytes
Database mounted.
Database opened.
idle> select name from v$database;
NAME
———
ORATS12C
idle> create spfile=’+TEST_TAN/ORATS12C_JAPAN/spfileorats12c.ora’ from pfile;
File created.
idle> exit
[oracle-n01.test.alinafe.net:oracle:ORATS1201:$dbs]: vi initORATS1201.ora
spfile=’+TEST_TAN/ORATS12C_JAPAN/spfileorats12c.ora’
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: srvctl add database -db ORATS12C_JAPAN -oraclehome /u01/app/oracle/product/12.1.0/dbhome_1 -spfile +TEST_TAN/ORATS12C_JAPAN/spfileorats12c.ora -dbname ORATS12C
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: srvctl config database -db ORATS12C_JAPAN -all
Database unique name: ORATS12C_JAPAN
Database name: ORATS12C
Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1
Oracle user: oracle
Spfile: +TEST_TAN/ORATS12C_JAPAN/spfileorats12c.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
Database is enabled
Database is individually enabled on nodes:
Database is individually disabled on nodes:
OSDBA group: dba
OSOPER group:
Database instances:
Configured nodes:
Database is administrator managed
For regular database:
[oracle-n00.test.alinafe.net:oracle:ORATS1200:$dbs]: asm
[oracle-n00.test.alinafe.net:oracle:+ASM1:$dbs]: asmcmd
ASMCMD [+] > pwcreate –dbuniquename ORATS12C_JAPAN +TEST_TAN/ORATS12C_JAPAN/orapworats12c_japan *******
OPW-00010: Could not create the password file.
ORA-15056: additional error message
ORA-15221: ASM operation requires compatible.asm of 12.1.0.0.0 or higher
ORA-06512: at line 4
ASMCMD-9454: could not create new password file
ASMCMD [+] >
ASMCMD> pwget –dbuniquename orats12c_japan