Movement DB file to new disk group (for example +DATA02) / Switch to New disk groups


Strategy 1. / Copy each db file
RMAN> backup as copy datafile 19 format '+DATA02';
Starting backup at 17-JAN-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00019 name=+DATA01/ANARDB/datafile/system.281.801406799
output file name=+DATA02/ANARDB/datafile/system.256.834409133 tag=TAG20131217T121852 RECID=13 STAMP=834409138
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 17-JAN-11
Strategy 2 / Copy complete database
RMAN> backup as copy database format '+DATA02';
Starting backup at 17-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.276.812153865
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.257.834409167 tag=TAG20131217T121927 RECID=14 STAMP=834409255
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.275.812153995
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.258.834409263 tag=TAG20131217T121927 RECID=15 STAMP=834409350
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.274.812154063
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.259.834409359 tag=TAG20131217T121927 RECID=16 STAMP=834409447
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.273.812154191
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.260.834409453 tag=TAG20131217T121927 RECID=17 STAMP=834409553
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00009 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.266.821749103
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.261.834409559 tag=TAG20131217T121927 RECID=18 STAMP=834409589
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00016 name=+DATA01/ANARDB/datafile/sysaux.278.801406735
output file name=+DATA02/ANARDB/datafile/sysaux.262.834409593 tag=TAG20131217T121927 RECID=19 STAMP=834409614
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00017 name=+DATA01/ANARDB/datafile/undotbs1.279.801406757
output file name=+DATA02/ANARDB/datafile/undotbs1.263.834409619 tag=TAG20131217T121927 RECID=20 STAMP=834409633
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA01/ANARDB/datafile/undotbs1.258.797379227
output file name=+DATA02/ANARDB/datafile/undotbs1.264.834409633 tag=TAG20131217T121927 RECID=21 STAMP=834409647
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA01/ANARDB/datafile/system.256.797379227
output file name=+DATA02/ANARDB/datafile/system.265.834409649 tag=TAG20131217T121927 RECID=22 STAMP=834409656
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA01/ANARDB/datafile/users.259.797379227
output file name=+DATA02/ANARDB/datafile/users.266.834409663 tag=TAG20131217T121927 RECID=23 STAMP=834409670
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00018 name=+DATA01/ANARDB/datafile/users.280.801406775
output file name=+DATA02/ANARDB/datafile/users.267.834409671 tag=TAG20131217T121927 RECID=24 STAMP=834409677
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00019 name=+DATA01/ANARDB/datafile/system.281.801406799
output file name=+DATA02/ANARDB/datafile/system.268.834409677 tag=TAG20131217T121927 RECID=25 STAMP=834409683
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA01/ANARDB/datafile/sysaux.257.797379227
output file name=+DATA02/ANARDB/datafile/sysaux.269.834409685 tag=TAG20131217T121927 RECID=26 STAMP=834409687
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=+DATA01/ANARDB/datafile/OC_TABLESPACE.272.828469977
output file name=+DATA02/ANARDB/datafile/OC_TABLESPACE.270.834409689 tag=TAG20131217T121927 RECID=27 STAMP=834409690
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA02/ANARDB/controlfile/backup.271.834409691 tag=TAG20131217T121927 RECID=28 STAMP=834409692
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 17-JAN-11
channel ORA_DISK_1: finished piece 1 at 17-JAN-11
piece handle=+DATA02/ANARDB/backupset/2013_12_17/nnsnf0_tag20131217t121927_0.272.834409695 tag=TAG20131217T121927 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 17-JAN-11
RMAN>
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+DATA02/ANARDB/datafile/system.265.834409649"
datafile 2 switched to datafile copy "+DATA02/ANARDB/datafile/sysaux.269.834409685"
datafile 3 switched to datafile copy "+DATA02/ANARDB/datafile/undotbs1.264.834409633"
datafile 4 switched to datafile copy "+DATA02/ANARDB/datafile/users.266.834409663"
datafile 5 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.257.834409167"
datafile 6 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.258.834409263"
datafile 7 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.259.834409359"
datafile 8 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.260.834409453"
datafile 9 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.261.834409559"
datafile 10 switched to datafile copy "+DATA02/ANARDB/datafile/OC_TABLESPACE.270.834409689"
datafile 16 switched to datafile copy "+DATA02/ANARDB/datafile/sysaux.262.834409593"
datafile 17 switched to datafile copy "+DATA02/ANARDB/datafile/undotbs1.263.834409619"
datafile 18 switched to datafile copy "+DATA02/ANARDB/datafile/users.267.834409671"
datafile 19 switched to datafile copy "+DATA02/ANARDB/datafile/system.268.834409677"
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name ANARDB
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 2048 SYSTEM *** +DATA02/ANARDB/datafile/system.265.834409649
2 820 SYSAUX *** +DATA02/ANARDB/datafile/sysaux.269.834409685
3 3715 UNDOTBS1 *** +DATA02/ANARDB/datafile/undotbs1.264.834409633
4 2048 USERS *** +DATA02/ANARDB/datafile/users.266.834409663
5 30720 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.257.834409167
6 30720 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.258.834409263
7 30720 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.259.834409359
8 30720 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.260.834409453
9 10000 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.261.834409559
10 500 OC_TABLESPACE *** +DATA02/ANARDB/datafile/OC_TABLESPACE.270.834409689
16 7168 SYSAUX *** +DATA02/ANARDB/datafile/sysaux.262.834409593
17 5120 UNDOTBS1 *** +DATA02/ANARDB/datafile/undotbs1.263.834409619
18 2048 USERS *** +DATA02/ANARDB/datafile/users.267.834409671
19 2048 SYSTEM *** +DATA02/ANARDB/datafile/system.268.834409677
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 32767 TEMP 32767 +DATA01/ANARDB/tempfile/temp.264.797379307
2 10240 TEMP 10240 +DATA01/ANARDB/tempfile/temp.277.801406709
3 10 TEMP 10 +DATA01/ANARDB/tempfile/temp.282.802955967
4 10 TEMP 10 +DATA01/ANARDB/tempfile/temp.285.802956051
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: