- DBMS_FILE_TRANSFER method
- RMAN backup method
Pre-requisites for using "XTTS+Cross platform incremental backup" migration approach
- The source database must have its COMPATIBLE parameter set to 10.2.0 or higher.
- The source database's COMPATIBLE parameter must not be greater than the destination database's COMPATIBLE parameter.
- The source database must be in ARCHIVELOG mode.
- RMAN on the source system must not have DEVICE TYPE DISK configured with COMPRESSED.
- The set of tablespaces being moved must all be online, and contain no offline data files. Tablespaces must be READ WRITE. Tablespaces that are READ ONLY may be moved with the normal XTTS method. There is no need to incorporate Cross Platform Incremental Backups to move tablespaces that are always READ ONLY.
- Destination database should be created or available in read write mode. If possible, then please create 11.2.0.4 database.
- Tablespaces to be transported should not exist on dest, if yes rename the tablespaces at destination.
- If the destination database is 11.2.0.3 or earlier, then please install 11.2.0.4 database software on the destination.
- This new database software will be used to create a convert instance.
- SOURCE and TARGET database TNS entries should be available in both source and target servers.
- Download supporting scripts for Cross Platform Incremental Backups from Doc ID 1389592.1. Copy it to source server and unzip it.
- Ensure that the schema users required for the tablespace transport exist in the destination database.
- Per generic TTS requirement must be met. The tool also performs this check.
- dfcopydir, backupformat, stageondest and backupondest directories should be created before using the migration tool.
- The above directories should be created keeping in mind the space requirements for migration.
- Refer to xtt.properties file of RMAN convert scripts downloaded in previous step for more info on these folders.
Below are the settings that I've used for this demonstration. This demo is only for non-ASM databases but the same steps can be used for ASM with minor modifications.
DBMS_FILE_TRANSFER method
Phase 1 – Initial Setup
1.1 Prerequisites verification
1.2 Configure Directory Objects and Database Links
1.3 Configure xtt.properties file
[oracle@DBmig1 ~]$ cd rman_xttconvert[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 96-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties[oracle@DBmig1 rman_xttconvert]$ vi xtt.properties
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Error:——Please define xtt.properties:stageondest!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Error:——Please define xtt.properties:dfcopydir!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!## 1.4 Copy xttconvert Scripts and xtt.properties to the Destination System
[oracle@DBmig1 ~]$ cd /home/oraclescp -r rman_xttconvert oracle@DBmig2:/home/oracle/rman_xttconvertxttstartupnomount.sql 100% 52 0.1KB/s 00:00xttcnvrtbkupdest.sql 100% 1390 1.4KB/s 00:00xttprep.tmpl 100% 9728 9.5KB/s 00:00xttdriver.pl 100% 56KB 56.4KB/s 00:00xtt.properties 100% 5389 5.3KB/s 00:00xttdbopen.sql 100% 71 0.1KB/s 00:00# Phase 2 – Prepare Phase
2.1 Run the Prepare Step on the Source System
[oracle@DBmig1 ~]$ cd rman_xttconvert[oracle@DBmig1 rman_xttconvert]$ . oraenvORACLE_SID = [DBmig1] ?The Oracle base remains unchanged with value /home/oracle/app/oracle[oracle@DBmig1 rman_xttconvert]$ export TMPDIR=/home/oracle/rman_xttconvert[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 96-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties[oracle@DBmig1 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -SPrepare source for Tablespaces: 'XTTS1' /home/oracle/stageondestxttpreparesrc.sql for 'XTTS1' started at Tue Jun 3 13:19:30 2014xttpreparesrc.sql for ended at Tue Jun 3 13:19:30 2014Prepare source for Tablespaces: 'XTTS2' /home/oracle/stageondestxttpreparesrc.sql for 'XTTS2' started at Tue Jun 3 13:19:30 2014xttpreparesrc.sql for ended at Tue Jun 3 13:19:30 2014Prepare source for Tablespaces: '' /home/oracle/stageondestxttpreparesrc.sql for '' started at Tue Jun 3 13:19:30 2014xttpreparesrc.sql for ended at Tue Jun 3 13:19:30 2014[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 120-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties-rw-r–r– 1 oracle oinstall 9794 Jun 3 13:19 xttpreparesrc.sql-rw-r–r– 1 oracle oinstall 0 Jun 3 13:19 xttprepare.cmd-rw-r–r– 1 oracle oinstall 38 Jun 3 13:19 xttplan.txt-rw-r–r– 1 oracle oinstall 58 Jun 3 13:19 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 897 Jun 3 13:19 getfile.sql[oracle@DBmig1 rman_xttconvert]$
2.2 Transfer the Datafiles to the Destination System
[oracle@DBmig1 rman_xttconvert]$ scp xttnewdatafiles.txt getfile.sql oracle@DBmig2:/home/oracle/rman_xttconvertxttnewdatafiles.txt 100% 58 0.1KB/s 00:00getfile.sql 100% 897 0.9KB/s 00:00[oracle@DBmig1 rman_xttconvert]$
[oracle@DBmig2 ~]$ cd rman_xttconvert[oracle@DBmig2 rman_xttconvert]$ . oraenvORACLE_SID = [DBmig2] ?The Oracle base remains unchanged with value /home/oracle/app/oracle[oracle@DBmig2 rman_xttconvert]$ export TMPDIR=/home/oracle/rman_xttconvert[oracle@DBmig2 rman_xttconvert]$ ls -ltrtotal 104-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:15 xtt.properties-rw-r–r– 1 oracle oinstall 58 Jun 3 13:20 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 897 Jun 3 13:20 getfile.sql[oracle@DBmig2 rman_xttconvert]$ vi xtt.properties[oracle@DBmig2 rman_xttconvert]$[oracle@DBmig2 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -G[oracle@DBmig2 rman_xttconvert]$ ls -ltrtotal 108-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:15 xtt.properties-rw-r–r– 1 oracle oinstall 897 Jun 3 13:20 getfile.sql-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txttemp-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txt[oracle@DBmig2 rman_xttconvert]$ ls -ltr /home/oracle/app/oracle/oradata/DBMIG2/datafiletotal 1410596-rw-r—– 1 oracle oinstall 5251072 Jun 3 13:11 o1_mf_users_9rjzhvx9_.dbf-rw-r—– 1 oracle oinstall 20979712 Jun 3 13:11 o1_mf_temp_9rjzl327_.tmp-rw-r—– 1 oracle oinstall 31465472 Jun 3 13:16 o1_mf_undotbs1_9rjzhvww_.dbf-rw-r—– 1 oracle oinstall 524296192 Jun 3 13:16 o1_mf_sysaux_9rjzhvwr_.dbf-rw-r—– 1 oracle oinstall 775954432 Jun 3 13:16 o1_mf_system_9rjzhvw9_.dbf-rw-r—– 1 oracle oinstall 52436992 Jun 3 13:21 xtts1.dbf-rw-r—– 1 oracle oinstall 52436992 Jun 3 13:21 xtts2.dbf[oracle@DBmig2 rman_xttconvert]$# Phase 3 – Roll Forward Phase
3.1 Create Incremental Backup of the Tablespaces being Transported on the Source System
[oracle@DBmig1 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -iPrepare newscn for Tablespaces: 'XTTS1'Prepare newscn for Tablespaces: 'XTTS2'Prepare newscn for Tablespaces: ''rman target / cmdfile /home/oracle/rman_xttconvert/rmanincr.cmd
Recovery Manager: Release 11.2.0.4.0 – Production on Tue Jun 3 13:22:38 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DBMIG1 (DBID=551320002)
RMAN> set nocfau;2> host 'echo ts::XTTS1';3> backup incremental from scn 12006874> tag tts_incr_update tablespace 'XTTS1' format5> '/home/oracle/app/oracle/fast_recovery_area/DBMIG1/%U';6> set nocfau;7> host 'echo ts::XTTS2';8> backup incremental from scn 12007049> tag tts_incr_update tablespace 'XTTS2' format10> '/home/oracle/app/oracle/fast_recovery_area/DBMIG1/%U';11>executing command: SET NOCFAUusing target database control file instead of recovery catalog
ts::XTTS1host command complete
Starting backup at 03-JUN-14allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=34 device type=DISKchannel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00005 name=/home/oracle/app/oracle/oradata/DBMIG1/datafile/xtts1.dbfchannel ORA_DISK_1: starting piece 1 at 03-JUN-14channel ORA_DISK_1: finished piece 1 at 03-JUN-14piece handle=/home/oracle/app/oracle/fast_recovery_area/DBMIG1/0fp9tosv_1_1 tag=TTS_INCR_UPDATE comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-JUN-14
executing command: SET NOCFAU
ts::XTTS2host command complete
Starting backup at 03-JUN-14using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00006 name=/home/oracle/app/oracle/oradata/DBMIG1/datafile/xtts2.dbfchannel ORA_DISK_1: starting piece 1 at 03-JUN-14channel ORA_DISK_1: finished piece 1 at 03-JUN-14piece handle=/home/oracle/app/oracle/fast_recovery_area/DBMIG1/0gp9tot0_1_1 tag=TTS_INCR_UPDATE comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-JUN-14
Recovery Manager complete.
[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 148-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties-rw-r–r– 1 oracle oinstall 9794 Jun 3 13:19 xttpreparesrc.sql-rw-r–r– 1 oracle oinstall 38 Jun 3 13:19 xttplan.txt-rw-r–r– 1 oracle oinstall 58 Jun 3 13:19 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 897 Jun 3 13:19 getfile.sql-rw-r–r– 1 oracle oinstall 0 Jun 3 13:22 xttprepare.cmd-rw-r–r– 1 oracle oinstall 42 Jun 3 13:22 xttplan.txt.new-rw-r–r– 1 oracle oinstall 9749 Jun 3 13:22 xttdetnewfromscnsrc.sql-rw-r–r– 1 oracle oinstall 354 Jun 3 13:22 rmanincr.cmd-rw-r–r– 1 oracle oinstall 44 Jun 3 13:22 tsbkupmap.txt-rw-r–r– 1 oracle oinstall 126 Jun 3 13:22 incrbackups.txt
3.2 Transfer Incremental Backup to the Destination System
[oracle@DBmig1 rman_xttconvert]$ scp cat incrbackups.txt oracle@DBmig2:/home/oracle/stageondest0gp9tot0_1_1 100% 40KB 40.0KB/s 00:000fp9tosv_1_1 100% 40KB 40.0KB/s 00:00
3.3 Convert the Incremental Backup and Apply to the Datafile Copies on the Destination System
[oracle@DBmig1 rman_xttconvert]$ scp xttplan.txt.new tsbkupmap.txt oracle@DBmig2:/home/oracle/rman_xttconvertxttplan.txt.new 100% 42 0.0KB/s 00:00tsbkupmap.txt 100% 44 0.0KB/s 00:00[oracle@DBmig1 rman_xttconvert]$[oracle@DBmig2 rman_xttconvert]$ ls -ltrtotal 116-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:15 xtt.properties-rw-r–r– 1 oracle oinstall 897 Jun 3 13:20 getfile.sql-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txttemp-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 42 Jun 3 13:23 xttplan.txt.new-rw-r–r– 1 oracle oinstall 44 Jun 3 13:23 tsbkupmap.txt[oracle@DBmig2 rman_xttconvert]$ mv xttplan.txt.new xttplan.txt[oracle@DBmig2 rman_xttconvert]$ ls -ltrtotal 116-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:15 xtt.properties-rw-r–r– 1 oracle oinstall 897 Jun 3 13:20 getfile.sql-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txttemp-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 42 Jun 3 13:23 xttplan.txt-rw-r–r– 1 oracle oinstall 44 Jun 3 13:23 tsbkupmap.txt[oracle@DBmig2 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -rStart rollforwardEnd of rollforward phase[oracle@DBmig2 rman_xttconvert]$
3.4 Determine the FROM_SCN for the Next Incremental Backup
[oracle@DBmig1 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -sPrepare newscn for Tablespaces: 'XTTS1'Prepare newscn for Tablespaces: 'XTTS2'Prepare newscn for Tablespaces: ''New /home/oracle/rman_xttconvert/xttplan.txt with FROM SCN's generated[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 160-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties-rw-r–r– 1 oracle oinstall 9794 Jun 3 13:19 xttpreparesrc.sql-rw-r–r– 1 oracle oinstall 38 Jun 3 13:19 xttplan.txt1401782168-rw-r–r– 1 oracle oinstall 58 Jun 3 13:19 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 897 Jun 3 13:19 getfile.sql-rw-r–r– 1 oracle oinstall 42 Jun 3 13:22 xttplan.txt-rw-r–r– 1 oracle oinstall 9749 Jun 3 13:22 xttdetnewfromscnsrc.sql-rw-r–r– 1 oracle oinstall 354 Jun 3 13:22 rmanincr.cmd-rw-r–r– 1 oracle oinstall 44 Jun 3 13:22 tsbkupmap.txt-rw-r–r– 1 oracle oinstall 126 Jun 3 13:22 incrbackups.txt-rw-r–r– 1 oracle oinstall 9757 Jun 3 13:26 xttpreparenextiter.sql-rw-r–r– 1 oracle oinstall 0 Jun 3 13:26 xttprepare.cmd
Phase 4 – Transport Phase
4.1 Make the Transportable Tablespaces READ ONLY in the Source Database
[oracle@DBmig1 rman_xttconvert]$[oracle@DBmig1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 3 12:57:10 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 ONLINEXTTS2 ONLINE
SQL> alter tablespace xtts1 read only;
Tablespace altered.
SQL> alter tablespace xtts2 read only;
Tablespace altered.
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 READ ONLYXTTS2 READ ONLY
SQL>## 4.2 Create the Final Incremental Backup, Transfer, Convert, and Apply It to the Destination Datafiles.
[oracle@DBmig1 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -iPrepare newscn for Tablespaces: 'XTTS1'Prepare newscn for Tablespaces: 'XTTS2'Prepare newscn for Tablespaces: ''rman target / cmdfile /home/oracle/rman_xttconvert/rmanincr.cmd
Recovery Manager: Release 11.2.0.4.0 – Production on Tue Jun 3 13:29:29 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DBMIG1 (DBID=551320002)
RMAN> set nocfau;2> host 'echo ts::XTTS1';3> backup incremental from scn 12006874> tag tts_incr_update tablespace 'XTTS1' format5> '/home/oracle/app/oracle/fast_recovery_area/DBMIG1/%U';6> set nocfau;7> host 'echo ts::XTTS2';8> backup incremental from scn 12007049> tag tts_incr_update tablespace 'XTTS2' format10> '/home/oracle/app/oracle/fast_recovery_area/DBMIG1/%U';11>executing command: SET NOCFAUusing target database control file instead of recovery catalog
ts::XTTS1host command complete
Starting backup at 03-JUN-14allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=33 device type=DISKchannel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00005 name=/home/oracle/app/oracle/oradata/DBMIG1/datafile/xtts1.dbfchannel ORA_DISK_1: starting piece 1 at 03-JUN-14channel ORA_DISK_1: finished piece 1 at 03-JUN-14piece handle=/home/oracle/app/oracle/fast_recovery_area/DBMIG1/0hp9tp9q_1_1 tag=TTS_INCR_UPDATE comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-JUN-14
executing command: SET NOCFAU
ts::XTTS2host command complete
Starting backup at 03-JUN-14using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00006 name=/home/oracle/app/oracle/oradata/DBMIG1/datafile/xtts2.dbfchannel ORA_DISK_1: starting piece 1 at 03-JUN-14channel ORA_DISK_1: finished piece 1 at 03-JUN-14piece handle=/home/oracle/app/oracle/fast_recovery_area/DBMIG1/0ip9tp9r_1_1 tag=TTS_INCR_UPDATE comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 03-JUN-14
Recovery Manager complete.
[oracle@DBmig1 rman_xttconvert]$ scp cat incrbackups.txt oracle@DBmig2:/home/oracle/stageondest0ip9tp9r_1_1 100% 40KB 40.0KB/s 00:000hp9tp9q_1_1 100% 40KB 40.0KB/s 00:00[oracle@DBmig1 rman_xttconvert]$ ls -ltrtotal 176-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:16 xtt.properties-rw-r–r– 1 oracle oinstall 9794 Jun 3 13:19 xttpreparesrc.sql-rw-r–r– 1 oracle oinstall 38 Jun 3 13:19 xttplan.txt1401782168-rw-r–r– 1 oracle oinstall 58 Jun 3 13:19 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 897 Jun 3 13:19 getfile.sql-rw-r–r– 1 oracle oinstall 42 Jun 3 13:22 xttplan.txt-rw-r–r– 1 oracle oinstall 354 Jun 3 13:22 rmanincr.cmd1401782369-rw-r–r– 1 oracle oinstall 44 Jun 3 13:22 tsbkupmap.txt1401782372-rw-r–r– 1 oracle oinstall 126 Jun 3 13:22 incrbackups.txt1401782372-rw-r–r– 1 oracle oinstall 9757 Jun 3 13:26 xttpreparenextiter.sql-rw-r–r– 1 oracle oinstall 0 Jun 3 13:29 xttprepare.cmd-rw-r–r– 1 oracle oinstall 42 Jun 3 13:29 xttplan.txt.new-rw-r–r– 1 oracle oinstall 9749 Jun 3 13:29 xttdetnewfromscnsrc.sql-rw-r–r– 1 oracle oinstall 354 Jun 3 13:29 rmanincr.cmd-rw-r–r– 1 oracle oinstall 44 Jun 3 13:29 tsbkupmap.txt-rw-r–r– 1 oracle oinstall 126 Jun 3 13:29 incrbackups.txt[oracle@DBmig1 rman_xttconvert]$ cat xttplan.txt.new XTTS1::::1221550 5 XTTS2::::1221562 6[oracle@DBmig1 rman_xttconvert]$ scp xttplan.txt.new tsbkupmap.txt oracle@DBmig2:/home/oracle/rman_xttconvertxttplan.txt.new 100% 42 0.0KB/s 00:00tsbkupmap.txt 100% 44 0.0KB/s 00:00[oracle@DBmig1 rman_xttconvert]$[oracle@DBmig2 rman_xttconvert]$ ls -ltrtotal 120-r-xr-xr-x 1 oracle oinstall 52 Feb 19 14:54 xttstartupnomount.sql-r-xr-xr-x 1 oracle oinstall 9728 Feb 19 14:54 xttprep.tmpl-r-xr-xr-x 1 oracle oinstall 71 Feb 19 14:54 xttdbopen.sql-r-xr-xr-x 1 oracle oinstall 1390 Feb 19 14:54 xttcnvrtbkupdest.sql-r-xr-xr-x 1 oracle oinstall 57799 Feb 21 13:42 xttdriver.pl-rwxr-xr-x 1 oracle oinstall 5429 Jun 3 13:15 xtt.properties-rw-r–r– 1 oracle oinstall 897 Jun 3 13:20 getfile.sql-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txttemp-rw-r–r– 1 oracle oinstall 136 Jun 3 13:21 xttnewdatafiles.txt-rw-r–r– 1 oracle oinstall 42 Jun 3 13:23 xttplan.txt-rw-r–r– 1 oracle oinstall 42 Jun 3 13:31 xttplan.txt.new-rw-r–r– 1 oracle oinstall 44 Jun 3 13:31 tsbkupmap.txt[oracle@DBmig2 rman_xttconvert]$ mv xttplan.txt xttplan.txt_old[oracle@DBmig2 rman_xttconvert]$ mv xttplan.txt.new xttplan.txt[oracle@DBmig2 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -rStart rollforwardEnd of rollforward phase## 4.3 Import Object Metadata into Destination Database
[oracle@DBmig2 rman_xttconvert]$ $ORACLE_HOME/perl/bin/perl xttdriver.pl -e[oracle@DBmig2 rman_xttconvert]$ cat xttpxttplan.txt xttplan.txt_old xttplugin.txt xttprep.tmpl[oracle@DBmig2 rman_xttconvert]$ cat xttplugin.txtimpdp directory=<DATA_PUMP_DIR> logfile=<tts_imp.log> network_link=<ttslink> transport_full_check=no transport_tablespaces=XTTS1,XTTS2 transport_datafiles='/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts1.dbf','/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts2.dbf';[oracle@DBmig2 rman_xttconvert]$ vi xttplugin.txt
impdp system/Welcome1 directory=DATA_PUMP_DIR logfile=tts_imp.log network_link=ttslink transport_full_check=no transport_tablespaces=XTTS1,XTTS2 transport_datafiles='/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts1.dbf','/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts2.dbf';
[oracle@DBmig2 rman_xttconvert]$ sh xttplugin.txt
Import: Release 11.2.0.4.0 – Production on Tue Jun 3 13:36:33 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.Password:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsStarting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/******** directory=DATA_PUMP_DIR logfile=tts_imp.log network_link=ttslink transport_full_check=no transport_tablespaces=XTTS1,XTTS2 transport_datafiles=/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts1.dbf,/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts2.dbfProcessing object type TRANSPORTABLE_EXPORT/PLUGTS_BLKProcessing object type TRANSPORTABLE_EXPORT/TABLEProcessing object type TRANSPORTABLE_EXPORT/INDEX/INDEXProcessing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINTProcessing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLKJob "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at Tue Jun 3 13:37:10 2014 elapsed 0 00:00:28
[oracle@DBmig2 rman_xttconvert]$## 4.4 Make the Transportable Tablespaces READ WRITE in the Source Database
[oracle@DBmig1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 3 13:42:24 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 READ ONLYXTTS2 READ ONLY
SQL> alter tablespace xtts1 read write;
Tablespace altered.
SQL> alter tablespace xtts2 read write;
Tablespace altered.
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 ONLINEXTTS2 ONLINE
SQL> conn xtts1/xtts1Connected.SQL> select * from cat;
TABLE_NAME TABLE_TYPE—————————— ———–COUNTRIES TABLE
SQL> select count(*) from countries;
COUNT(*)———- 10000
4.5 Validate the Transported Data
[oracle@DBmig2 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 – Production on Tue Jun 3 13:38:25 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DBMIG2 (DBID=1043324687)
RMAN> validate tablespace xtts1,xtts2;
Starting validate at 03-JUN-14using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=31 device type=DISKchannel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationinput datafile file number=00005 name=/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts1.dbfinput datafile file number=00006 name=/home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts2.dbfchannel ORA_DISK_1: validation complete, elapsed time: 00:00:01List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN—- —— ————– ———— ————— ———-5 OK 0 6129 6400 932915 File Name: /home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts1.dbf Block Type Blocks Failing Blocks Processed ———- ————– —————- Data 0 65 Index 0 65 Other 0 141
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN—- —— ————– ———— ————— ———-6 OK 0 6273 6400 932136 File Name: /home/oracle/app/oracle/oradata/DBMIG2/datafile/xtts2.dbf Block Type Blocks Failing Blocks Processed ———- ————– —————- Data 0 0 Index 0 0 Other 0 127
Finished validate at 03-JUN-14
RMAN>
4.6 Make the Transportable Tablespaces READ WRITE in the Destination Database
[oracle@DBmig2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 3 13:40:20 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 READ ONLYXTTS2 READ ONLY
SQL> alter tablespace xtts1 read write;
Tablespace altered.
SQL> alter tablespace xtts2 read write;
Tablespace altered.
SQL> select tablespace_name,status from dba_tablespaces where tablespace_name like 'XTTS%';
TABLESPACE_NAME STATUS—————————— ———XTTS1 ONLINEXTTS2 ONLINE
SQL> conn xtts1/xtts1Connected.SQL> select * from cat;
TABLE_NAME TABLE_TYPE—————————— ———–COUNTRIES TABLE
SQL> select count(*) from countries;
COUNT(*)———- 10000
SQL># Phase 5 – Cleanup folders
http://rudreshgwd.blogspot.com/2014/06/migration-using-cross-platform.html