You are on page 1of 22

Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

(https://dbaclass.com) Search..... 

KNO W LEDGEBASE  DBA SCRIPTS (HTTPS://DBACLASS.CO M/MO NITO R-YO UR-DB/)


Q&A FO RUM (HTTP://FO RUM.DBACLASS.CO M/)
QUIZ (HTTPS://DBACLASS.CO M/QUIZZES/)

HOME (HTTPS://DBACLASS.COM) / ORACLE 12C (HTTPS://DBACLASS.COM


/ARTICLE-CATEGORY/ORACLE-12C/) / CROSS PLATFORM MIGRATION USING
TRANSPORTABLE TABLESPACE 12C WITH ZERO DOWNTIME
Search

Cross Platform Migration


Custom Search

Using Transportable BACKUP & RECO VERY 46

(h ttps://dbaclass.com

Tablespace 12c With Zero


/article-category
/backu p-recovery/)

Downtime CLO UD 16

(h ttps://dbaclass.com
/article-category
/clou d/)
 5521 views  3 min , 24 sec read  3
53
DATABASE
(h ttps://dbaclass.com
     In oracle 12c, transportable tablespace feature has been enhanced a
/article-category
lot. We can do cross platform migration using this feature with zero /database/)
downtime.  This method uses both RMAN and datapump utility .
DATABASE SCRIPTS 40
The first step will take a full backup of the script, when the tablespaces (h ttps://dbaclass.com
are online and restore the same in target . For next few iterations /article-category
incremental will be applied till we reach cut over period(actual /database-scripts/)

downtime period). During the final cutover phase, We have keep the 9
Database-W iki
tablespaces read only and take the final incremental with metadata (h ttps://dbaclass.com
exp.  This is the only time for which downtime is required during /article-category
migration.  For all these activities oracle provided few configuration /database-w iki/)

files, we need to unzip in both the environments. 21


DATAGUARD
(h ttps://dbaclass.com

1 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

In the below demo, we will do migration of two tablespaces from db /article-category


/datagu ard/)
server solaris sparc to hp ux  db server.(cross platform)
6
Source DB: WMTRAIN ( solaris sparc) DB TO O LS
(h ttps://dbaclass.com
Target DB: BSSTEST ( hp ux ) /article-category/db-
tools/)

18
GO LDENGATE
PREPARATION PHASE:
(h ttps://dbaclass.com
1. Download the rman-xttconvert_2.0 (https://dbaclass.com/wp-content /article-category
/uploads/2016/08/rman-xttconvert_2.0.zip) file  : ( Doc ID 2005729.1 /golden gate/)

(https://support.oracle.com/epmos/faces 3
HADO O P
/DocumentDisplay?_afrLoop=538724284348245&id=2005729.1& (h ttps://dbaclass.com
_adf.ctrl-state=bnz93tplx_130)) /article-category
/h adoop/)
2. Unzip the rman xtts_convert.zip in source db server.
38
HO W TO
(h ttps://dbaclass.com
/export/home/oracle/DBA_LAB/ /article-category
/h ow -to/)
-rw-r–r– 1 oracle oinstall 52 May 22 2015
60
xttstartupnomount.sql O RACLE 12C
(h ttps://dbaclass.com
-rw-r–r– 1 oracle oinstall 11549 May 22 2015 /article-category
xttprep.tmpl /oracle-12c/)
-rw-r–r– 1 oracle oinstall 91722 May 22 2015 4
O RACLE 18C
xttdriver.pl (h ttps://dbaclass.com
-rw-r–r– 1 oracle oinstall 71 May 22 2015 /article-category
/oracle-18c/)
xttdbopen.sql
-rw-r–r– 1 oracle oinstall 1390 May 22 2015 O RACLE RAC 35

xttcnvrtbkupdest.sql (h ttps://dbaclass.com
-rw-r–r– 1 oracle oinstall 7789 May 22 2015 /article-category
/oracle-rac/)
xtt.properties
O RACLE SECURITY 12
(h ttps://dbaclass.com
3. Update the xtt.properties file with below parameters. /article-category
/oracle-secu rity/)

26
PERFO RMANCE
# cat xtt.properties TUNING

2 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

tablespaces=WEBMDATA,WEBMINDX (h ttps://dbaclass.com
/article-category
platformid=2
/performan ce-
backupformat=/export/home/oracle/DBA_LAB/SOURCEDUMP tu n in g/)
stageondest=/b2cdev2/TEST_TAR
12
SHELL SCRIPT
storageondest=/b2cst1/oradata/BSSTEST
(h ttps://dbaclass.com
/article-category
/sh ell-script/)
Where
TRO UBLESHO O TING142
tablespaces – Mention the tablespaces need to be migrated. (h ttps://dbaclass.com
/article-category
platformid ( we can get the value by using select platform_id from
/trou blesh ooting/)
v$database;)
2
W EBLO GIC
backupformat – Location on source where where full backup and
(h ttps://dbaclass.com
incrmental rman backup will be stored. /article-category
/w eblogic/)
stageondest – Location on TARGET ,where the rman and dumpfiles will
be copied

storageondest– Location on TARGET, where datafiles will be created for Upgrade database
the tablespaces. from 11g to 12c
man u ally
(h ttps://dbaclass.com
/article/u pgrade-
5. Copy all the files including the updated xtt.properties file to target database-from-11g-
server. to-12c-man u ally/)
 42000  12
cd /export/home/oracle/DBA_LAB/

scp * oracle@target_host: /b2cdev2/TEST_TAR/ Upgrade database


from 12.1.0.2 to
6. export TMPDIR variable on both SOURCE and TARGET. 12.2.0.1
(h ttps://dbaclass.com
TMPDIR – location where the configuration files are stored, after /article/u pgrade-
unzipping. database-
from-12-1-0-2-
on source – export TMPDIR = /export/home/oracle to-12-2-0-1/)
/DBA_LAB/  30673  8

on target – export TMPDIR= /b2cdev2/TEST_TAR/ How to ru n SQL


tu n in g advisor for a
sql_id
(h ttps://dbaclass.com
INITIAL PHASE:

3 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

1.  Take fullrman backup of the source database.(use below script) /article/h ow -to-run -
sql-tu n in g-advisor-
$ORACLE_HOME/perl/bin/perl xttdriver.pl –backup for-a-sql_id/)
 29269  4

in stall oracle
golden gate 12c on
lin u x 7
(h ttps://dbaclass.com
/article/in stall-oracle-
golden gate-12c-on -
lin u x-7/)
 25247  0

How to drop and


recreate temp
tablespace in oracle
(h ttps://dbaclass.com
/article/h ow -to-drop-
an d-recreate-temp-
tablespace-in -oracle/)
 22550  6

O RA-04036: PGA
memory u sed by th e
in stan ce exceeds
PGA_AGGREGATE_LIMIT
(h ttps://dbaclass.com
/article/ora-04036-
pga-memory-u sed-
by-th e-in stan ce-
exceeds-
pga_aggregate_limit/)
 20732  0

O RA-39142:
in compatible version
n u mber 4.1 in du mp
file
(h ttps://dbaclass.com
/article/ora-39142-
in compatible-
version -n u mber-4-1-
in -du mp-file/)

4 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

 17614  2

$ORACLE_HOME/perl/bin/perl  xttdriver.pl --backup
Prerequ isite ch eck
-------------------------------------------------------------------- “Ch eckActiveFilesAn dExecu tables”
Parsing properties
--------------------------------------------------------------------
failed
(h ttps://dbaclass.com
-------------------------------------------------------------------- /article/prerequisite-
Done parsing properties
--------------------------------------------------------------------
ch eck-
ch eckactivefilesan dexecu tables-
-------------------------------------------------------------------- failed/)
Checking properties
--------------------------------------------------------------------  17416  3

--------------------------------------------------------------------
Done checking properties How to en able and
-------------------------------------------------------------------- disable flash back in
oracle database
--------------------------------------------------------------------
Starting prepare phase (h ttps://dbaclass.com
-------------------------------------------------------------------- /article/h ow -to-
Prepare source for Tablespaces: en able-an d-disable-
                  'WEBMDATA'  /b2cdev2/TEST_TAR
xttpreparesrc.sql for 'WEBMDATA' started at Wed Aug 17 18:21:04 2016 flash back-in -oracle-
xttpreparesrc.sql for  ended at Wed Aug 17 18:21:05 2016 database/)
Prepare source for Tablespaces:
                  'WEBMINDX'  /b2cdev2/TEST_TAR  16586  6
xttpreparesrc.sql for 'WEBMINDX' started at Wed Aug 17 18:26:08 2016
xttpreparesrc.sql for  ended at Wed Aug 17 18:26:09 2016
How to recover
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR stan dby database
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:11 2016 w h en arch ive logs
xttpreparesrc.sql for  ended at Wed Aug 17 18:27:12 2016
are missin g in
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR primary
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:14 2016 (h ttps://dbaclass.com
xttpreparesrc.sql for  ended at Wed Aug 17 18:27:15 2016
/article/h ow -to-
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR recover-stan dby-
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:17 2016 database-w h en-
xttpreparesrc.sql for  ended at Wed Aug 17 18:27:18 2016
arch ive-logs-are-
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR missin g-in -primary/)
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:20 2016
 16411  6
xttpreparesrc.sql for  ended at Wed Aug 17 18:27:20 2016
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:23 2016
xttpreparesrc.sql for  ended at Wed Aug 17 18:27:23 2016
Tags
Prepare source for Tablespaces:
                  ''  /b2cdev2/TEST_TAR
xttpreparesrc.sql for '' started at Wed Aug 17 18:27:26 2016 12c
(Https://dbaclass.com
/article-tag/12c/)

Arch ive
(Https://dbaclass.com

5 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

/article-tag/arch ive/)

2. Move the created rman backup set  to target location Arch ivelog
 to stageondest=/b2cdev2/TEST_TAR (Https://dbaclass.com
/article-
scp *bkp oracle@target-host:/b2cdev2/TEST_TAR/ tag/arch ivelog/)

3. Copy below newly created files from SOURCE to


ASM
TARGET tsbkupmap.txt and  xttnewdatafiles.txt (Https://dbaclass.com
/article-tag/asm/)
scp tsbkupmap.txt oracle@target-host:/b2cdev2
/TEST_TAR/ Au dit
(Https://dbaclass.com
scp xttnewdatafiles.txt oracle@target-host:/b2cdev2 /article-tag/audit/)
/TEST_TAR/
AW R
(Https://dbaclass.com
/article-tag/aw r/)
4. Run the restore script on target:

$ORACLE_HOME/perl/bin/perl xttdriver.pl –restore Clou d


(Https://dbaclass.com
/article-tag/cloud/)

Database
$ORACLE_HOME/perl/bin/perl xttdriver.pl --restore (Https://dbaclass.com
/article-
-------------------------------------------------------------------- tag/database/)
Parsing properties
--------------------------------------------------------------------
Datagu ard
--------------------------------------------------------------------
(Https://dbaclass.com
Done parsing properties
-------------------------------------------------------------------- /article-
tag/datagu ard/)
--------------------------------------------------------------------
Checking properties
-------------------------------------------------------------------- Datapatch
(Https://dbaclass.com
--------------------------------------------------------------------
Done checking properties
/article-
-------------------------------------------------------------------- tag/datapatch /)

--------------------------------------------------------------------
Start restore/recover Datapu mp
-------------------------------------------------------------------- (Https://dbaclass.com
/article-
--------------------------------------------------------------------
End of restore/recover phase tag/datapu mp/)
--------------------------------------------------------------------
DISKGRO UP
(Https://dbaclass.com

6 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

/article-
tag/diskgrou p/)
Now we did a complete restore of the full backup. Now next phase is
ROLLING FORWARD . EMCTL
(Https://dbaclass.com
ROLLING FORWARD PHASE: /article-tag/emctl/)

In this phase, we will apply the incremental backups from source to


EXPDP
target in multiple iterations, to keep minimal lag, so that during (Https://dbaclass.com
downtime, for final incremental ,it will take less time. /article-tag/expdp/)

1. Take incremental on source: Flash back


(Https://dbaclass.com
$ORACLE_HOME/perl/bin/perl xttdriver.pl –bkpinc
/article-
tag/flash back/)

Golden gate
(Https://dbaclass.com
/article-
tag/golden gate/)

Impdp
(Https://dbaclass.com
/article-tag/impdp/)

In stallation
(Https://dbaclass.com
/article-
tag/in stallation/)

LISTENER
(Https://dbaclass.com
/article-tag/listener/)

Mu ltiten an t
(Https://dbaclass.com
/article-
tag/mu ltiten an t/)

O EM
(Https://dbaclass.com
/article-tag/oem/)

O GG-
(Https://dbaclass.com

7 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

/article-tag/ogg/)

$ORACLE_HOME/perl/bin/perl xttdriver.pl --bkpinc


O RA-
(Https://dbaclass.com
-------------------------------------------------------------------- /article-tag/ora/)
Parsing properties
--------------------------------------------------------------------
O racle
-------------------------------------------------------------------- (Https://dbaclass.com
Done parsing properties
-------------------------------------------------------------------- /article-tag/oracle/)

--------------------------------------------------------------------
O racle 12.2.
Checking properties
-------------------------------------------------------------------- (Https://dbaclass.com
/article-tag/oracle-
--------------------------------------------------------------------
12-2/)
Done checking properties
--------------------------------------------------------------------
O racle 12c
--------------------------------------------------------------------
Backup incremental (Https://dbaclass.com
-------------------------------------------------------------------- /article-
Prepare newscn for Tablespaces: 'WEBMDATA' tag/oracle-12c/)
Prepare newscn for Tablespaces: 'WEBMINDX'
Prepare newscn for Tablespaces: ''
Prepare newscn for Tablespaces: '' Partition
Prepare newscn for Tablespaces: ''
(Https://dbaclass.com
Prepare newscn for Tablespaces: ''
Prepare newscn for Tablespaces: '' /article-
Prepare newscn for Tablespaces: '' tag/partition /)
rman target /  cmdfile /export/home/oracle/DBA_LAB/rmanincr.cmd

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 17 19: Patch


(Https://dbaclass.com
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights
/article-tag/patch /)
connected to target database: WMTRAIN (DBID=764374840)
PDB
RMAN> set nocfau; (Https://dbaclass.com
2> host 'echo ts::WEBMDATA'; /article-tag/pdb/)
3> backup for transport allow INCONSISTENT incremental from scn 166287830
4>   tablespace 'WEBMDATA' format
5>  '/export/home/oracle/DBA_LAB/SOURCEDUMP/%U'; Performan ce
6> set nocfau; (Https://dbaclass.com
7> host 'echo ts::WEBMINDX';
/article-
8> backup for transport allow INCONSISTENT incremental from scn 166287830
9>   tablespace 'WEBMINDX' format tag/performan ce/)
10>  '/export/home/oracle/DBA_LAB/SOURCEDUMP/%U';
11>
executing command: SET NOCFAU Performan ce Tu n in g
using target database control file instead of recovery catalog (Https://dbaclass.com
/article-
ts::WEBMDATA
host command complete tag/performan ce-
tu n in g/)
Starting backup at 17-AUG-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=889 device type=DISK Plu ggable

8 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

channel ORA_DISK_1: starting full datafile backup set (Https://dbaclass.com


channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN
/article-
input datafile file number=00008 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN tag/plu ggable/)
channel ORA_DISK_1: starting piece 1 at 17-AUG-16
channel ORA_DISK_1: finished piece 1 at 17-AUG-16
piece handle=/export/home/oracle/DBA_LAB/SOURCEDUMP/09rdggs6_1_1 tag RAC
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:25 (Https://dbaclass.com
Finished backup at 17-AUG-16 /article-tag/rac/)
executing command: SET NOCFAU
Redolog
ts::WEBMINDX
(Https://dbaclass.com
host command complete
/article-tag/redolog/)
Starting backup at 17-AUG-16
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set Rman
channel ORA_DISK_1: specifying datafile(s) in backup set (Https://dbaclass.com
input datafile file number=00006 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN /article-tag/rman /)
channel ORA_DISK_1: starting piece 1 at 17-AUG-16
channel ORA_DISK_1: finished piece 1 at 17-AUG-16
piece handle=/export/home/oracle/DBA_LAB/SOURCEDUMP/0ardgh2k_1_1 tag SCRIPT
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
(Https://dbaclass.com
Finished backup at 17-AUG-16
/article-tag/script/)
Recovery Manager complete.
Scripts
-------------------------------------------------------------------- (Https://dbaclass.com
Done backing up incrementals /article-tag/scripts/)
--------------------------------------------------------------------

Secu rity
(Https://dbaclass.com
2. Copy the below files from source to target: /article-tag/security/)

scp cat incrbackups.txt oracle@target-host:/b2cdev2


SHELL Script
/TEST_TAR (Https://dbaclass.com
scp xttplan.txt oracle@target-host:/b2cdev2 /article-tag/sh ell-
script/)
/TEST_TAR/
scp tsbkupmap.txt oracle@target-host:/b2cdev2 Stan dby
/TEST_TAR/ (Https://dbaclass.com
/article-tag/standby/)
scp incrbackups.txt oracle@target-host:/b2cdev2
/TEST_TAR/ Statistics
(Https://dbaclass.com
3. On TARGET , recover the incremental backup
/article-
$ORACLE_HOME/perl/bin/perl xttdriver.pl –recover tag/statistics/)

Tablespace
(Https://dbaclass.com
/article-

9 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

tag/tablespace/)

Temp
(Https://dbaclass.com
/article-tag/temp/)

Un do
(Https://dbaclass.com
/article-tag/u n do/)

Upgrade
(Https://dbaclass.com
/article-
tag/u pgrade/)

10 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

This rolling forward phase can done in multiple iterations to reduce to


difference between source and target database.

Once we reach the final cut over time ( where we will get downtime)
then we will take the final incremental.

FINAL INCREMENTAL BACKUP:


In this phase, source tablespaces will be made read only and
incremental backup from source to target db will be applied.

1. Make tablespaces read only on SOURCE:

alter tablespace WEBMDATA READ ONLY;

alter tablespace WEBMINDX READ ONLY;

2. Take final incremental backup with metadata export on SOURCE:

$ORACLE_HOME/perl/bin/perl xttdriver.pl –bkpexport

11 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

--------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Backup incremental
--------------------------------------------------------------------
Prepare newscn for Tablespaces: 'WEBMDATA'
Prepare newscn for Tablespaces: 'WEBMINDX'
Prepare newscn for Tablespaces: ''
Prepare newscn for Tablespaces: ''
Prepare newscn for Tablespaces: ''
Prepare newscn for Tablespaces: ''

Prepare newscn for Tablespaces: ''


Prepare newscn for Tablespaces: ''
rman target /  cmdfile /export/home/oracle/DBA_LAB/rmanincr.cmd

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 17 19:

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights

connected to target database: WMTRAIN (DBID=764374840)

RMAN> BACKUP FOR TRANSPORT INCREMENTAL from scn 166314204 TABLESPACE  


';
2>
Starting backup at 17-AUG-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=937 device type=DISK
Running TRANSPORT_SET_CHECK on specified tablespaces
TRANSPORT_SET_CHECK completed successfully

Performing export of metadata for specified tablespaces...


   EXPDP> Starting "SYS"."TRANSPORT_EXP_WMTRAIN_aiao":
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TRIGGER
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
   EXPDP> Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER

12 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

   EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE


   EXPDP> Master table "SYS"."TRANSPORT_EXP_WMTRAIN_aiao" successfully
   EXPDP> *********************************************************
   EXPDP> Dump file set for SYS.TRANSPORT_EXP_WMTRAIN_aiao is:
   EXPDP>   /u01/app/oracle/product/12.1.0.2/WMTRAIN/dbs/backup_tts_WMTRAIN_28718
   EXPDP> *********************************************************
   EXPDP> Datafiles required for transportable tablespace WEBMDATA:
   EXPDP>   /WMTRAIN/oradata/WMTRAIN/WMTRAIN/webmdata01.dbf
   EXPDP>   /WMTRAIN/oradata/WMTRAIN/WMTRAIN/webmdata02.dbf
   EXPDP> Datafiles required for transportable tablespace WEBMINDX:
   EXPDP>   /WMTRAIN/oradata/WMTRAIN/WMTRAIN/webmindx01.dbf
   EXPDP> Job "SYS"."TRANSPORT_EXP_WMTRAIN_aiao" successfully completed
Export completed

channel ORA_DISK_1: starting full datafile backup set


channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN
input datafile file number=00006 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN
input datafile file number=00008 name=/WMTRAIN/oradata/WMTRAIN/WMTRAIN
channel ORA_DISK_1: starting piece 1 at 17-AUG-16
channel ORA_DISK_1: finished piece 1 at 17-AUG-16
piece handle=/export/home/oracle/DBA_LAB/SOURCEDUMP/0brdghjg_1_1 tag
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
input Data Pump dump file=/u01/app/oracle/product/12.1.0.2/WMTRAIN/
channel ORA_DISK_1: starting piece 1 at 17-AUG-16
channel ORA_DISK_1: finished piece 1 at 17-AUG-16
piece handle=/export/home/oracle/DBA_LAB/SOURCEDUMP/0crdghk9_1_1 tag
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 17-AUG-16

Recovery Manager complete.

--------------------------------------------------------------------
Done backing up incrementals
--------------------------------------------------------------------

3. Copy the below files from SOURCE to TARGET:

scp cat incrbackups.txt oracle@target-host:/b2cdev2


/TEST_TAR/
scp xttplan.txt oracle@target-host:/b2cdev2
/TEST_TAR/
scp tsbkupmap.txt oracle@target-host:/b2cdev2
/TEST_TAR/
scp incrbackups.txt oracle@target-host:/b2cdev2
/TEST_TAR/

13 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

4. Import the incremental backup on TARGET:

$ORACLE_HOME/perl/bin/perl xttdriver.pl –resincrdmp

$ORACLE_HOME/perl/bin/perl xttdriver.pl --resincrdmp


  
------------------------------------------------------------------
Parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done parsing properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Done checking properties
--------------------------------------------------------------------

--------------------------------------------------------------------
Start restore/recover
--------------------------------------------------------------------

--------------------------------------------------------------------
End of restore/recover phase
--------------------------------------------------------------------

--------------------------------------------------------------------
Start creating dumpfile
--------------------------------------------------------------------

--------------------------------------------------------------------
End of creating dumpfile
--------------------------------------------------------------------

--------------------------------------------------------------------
Generating plugin
--------------------------------------------------------------------

--------------------------------------------------------------------
Done generating plugin file /b2cdev2/TEST_TAR/xttplugin.txt
--------------------------------------------------------------------

5. Import the generated metadata dump on TARGET:

create directory dpump_tts as ‘/b2cdev2/TEST_TAR’;

14 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

prepare the parfile as below:

cat “imp_ts.par”
dumpfile=impdp14442_745.dmp
logfile=imp_log.log
directory=dpump_tts
transport_datafiles=’/b2cst1/oradata/BSSTEST
/webmdata01.dbf’,’/b2cst1/oradata/BSSTEST
/webmindx01.dbf’,’/b2cst1/oradata/BSSTEST
/webmdata02.dbf’

impdp parfile=”imp_ts.par”

15 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

#impdp parfile="imp_ts.par"

Import: Release 12.1.0.2.0 - Production on Wed Aug 17 19:28:56 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights

Username: / as sysdba

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0


With the Partitioning, OLAP, Advanced Analytics and Real Application
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01":  /******** AS SYSDBA
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TRIGGER
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/STATISTICS/MARKER
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
ORA-39082: Object type TRIGGER:"WEBMDB"."ISTRIGDOC_DOCID_TBI" created
ORA-39082: Object type TRIGGER:"WEBMDB"."ISDATSTR_ID_TBI" created with
ORA-39082: Object type TRIGGER:"WEBMDB"."WMTBLUF005" created with compilation
ORA-39082: Object type TRIGGER:"WEBMDB"."WMTBLUF3LD" created with compilation
ORA-39082: Object type TRIGGER:"WEBMDB"."WMTBLUF0EU" created with compilation
ORA-39082: Object type TRIGGER:"WEBMDB"."WMTBLUF0HG" created with compilation
ORA-39082: Object type TRIGGER:"WEBMDB"."CMPNNTVNT_RBI" created with
ORA-39082: Object type TRIGGER:"WMMED"."BI_MED_EVENT_TXN" created with
ORA-39082: Object type TRIGGER:"WMMED"."ISTRIGDOC_DOCID_TBI" created

Lets compare the object count in both source and target:

Source:

16 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

SQL>  select object_type,count(*) from dba_objects where owner='WEBMDB'

OBJECT_TYPE               COUNT(*)
----------------------- ----------

on target:

SQL> select object_type,count(*) from dba_objects where owner='WEBMDB'

OBJECT_TYPE               COUNT(*)
----------------------- ----------
INDEX                          139
TABLE                           67
TRIGGER                          9
LOB                             33

We observed that sequences, function,pl/sql objects, type,views are


not getting migrated with this method. These objects need to migrated
using datapump method.

POST MIGRATION ACTIVITY:


                                       In this phase, we will bring the missing objects
from source to target. In our case, we observed that
PROCEDURE,VIEW,TYPE,FUNCTION,SEQUENCE were missing. Lets take
export these object types and import in target.

expdp dumpfile=test2.dmp logfile=test1.dmp


directory=SOURCEDUMP schemas=WEBMDB
include=SEQUENCE,function,TYPE,view,PROCEDURE

17 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

transfer the dump and import in target:

impdp dumpfile=test2.dmp logfile=test2.log


directory=dpump_tts

impdp dumpfile=test2.dmp logfile=test2.log directory=dpump_tts

Import: Release 12.1.0.2.0 - Production on Wed Aug 17 20:11:05 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights

Username: / as sysdba

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0


With the Partitioning, OLAP, Advanced Analytics and Real Application
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01":  /******** AS SYSDBA dumpfile=
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at Wed Aug 17

Now compile all the objects in target using utlrp.sql and check the
object count:

SQL> select object_type,count(*) from dba_objects where owner='WEBMDB'

OBJECT_TYPE               COUNT(*)
----------------------- ----------
INDEX                          139
PROCEDURE                       18
TABLE                           67
TRIGGER                          9
TYPE                             3
FUNCTION                         2
VIEW                             1
LOB                             33
SEQUENCE                         8

We can see all objects were migrated successfully. With this the
migration activity has been completed . And only downtime window

18 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

we required is only from the incremental backup to till end .


ORACLE 12C (HTTPS://DBACLASS.COM/ARTICLE-CATEGORY
/ORACLE-12C/)

About Admin
View all posts by Admin → (https://dbaclass.com/author
/admin/)

Related Articles

 How to flash back a Plu ggable database ( PDB) in oracle 12.2


(h ttps://dbaclass.com/article/flash back-plu ggable-database-pdb-
oracle-12-2/)

 How to create en crypted tablespace in PDB( oracle 12c)


(h ttps://dbaclass.com/article/create-en crypted-tablespace-pdb-
oracle-12c/)

 How to ru n expdp in plu ggable database(PDB)


(h ttps://dbaclass.com/article/get-export-du mp-plu ggable-database/)

 Rollback database patch in oracle 12c (h ttps://dbaclass.com/article


/rollback-database-patch -oracle-12c/)

 Apply patch on oracle 12.2 database ( Release u pdate)


(h ttps://dbaclass.com/article/apply-patch -oracle-12-2-database/)

 Perform Flash back in plu ggable database(PDB) in oracle 12.2


(h ttps://dbaclass.com/article/performan ce-flash back-plu ggable-
databasepdb-oracle-12-2/)

19 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

 TRUST_EXISTING_TABLE_PARTITIO NS in oracle 12.2 datapu mp


(h ttps://dbaclass.com/article/tru st_existin g_table_partition s-oracle-
12-2-datapu mp/)

 O UTBO UND_DBLINK_PRO TO CO LS in oracle 12.2


(h ttps://dbaclass.com/article/ou tbou n d_dblin k_protocols-oracle-12-2/)

3 thoughts on “Cross platform migration


using transportable tablespace 12c with zero
downtime”
Dave Cleary
OCTOBER 23, 2017 AT 2:13 PM (HTTPS://DBACLASS.COM/ARTICLE/CROSS-

PLATFORM-MIGRATION-USING-TRANSPORTABLE-TABLESPACE-12C-WITH-

ZERO-DOWNTIME/#COMMENT-3976)
Misleadin g title. Th is process h as dow n time, bu t th e title
says Zero Dow n time.

 REPLY (HTTPS://DBACLASS.COM/ARTICLE/CROSS-PLATFORM-MIGRATION-

USING-TRANSPORTABLE-TABLESPACE-12C-WITH-ZERO-DOWNTIME

/?REPLYTOCOM=3976#RESPOND)

Admin (https://dbaclass.com/members/admin/)
OCTOBER 30, 2017 AT 7:57 PM (HTTPS://DBACLASS.COM/ARTICLE/CROSS-

PLATFORM-MIGRATION-USING-TRANSPORTABLE-TABLESPACE-12C-WITH-

ZERO-DOWNTIME/#COMMENT-4055)
Hi Dave,

O racle on ly n amed it as zero dow n time meth od. As men -


tion ed th e dow n time is very min imal for th is meth ods
th ou gh n ot completely zero.

 REPLY (HTTPS://DBACLASS.COM/ARTICLE/CROSS-PLATFORM-

MIGRATION-USING-TRANSPORTABLE-TABLESPACE-12C-WITH-ZERO-

DOWNTIME/?REPLYTOCOM=4055#RESPOND)

20 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

Pramod
AUGUST 15, 2018 AT 5:11 PM (HTTPS://DBACLASS.COM/ARTICLE/CROSS-

PLATFORM-MIGRATION-USING-TRANSPORTABLE-TABLESPACE-12C-WITH-

ZERO-DOWNTIME/#COMMENT-14212)
Can th is be applied on migration w ith differen t en dian for-
mat in Mu ltiten an t Arch itectu re? W e h ave Sin gle Ten an t
database in Con tain er an d w e w an ted to migrate to Lin u x
w ith on ly PDB migration . Can you let me kn ow if th at is pos-
sible by u sin g th ese scripts? From O racle Su pport site w e got
to kn ow for Mu ltiTen an t can t be u sed. Bu t w e w an ted to see
if th at is Possible

 REPLY (HTTPS://DBACLASS.COM/ARTICLE/CROSS-PLATFORM-MIGRATION-

USING-TRANSPORTABLE-TABLESPACE-12C-WITH-ZERO-DOWNTIME

/?REPLYTOCOM=14212#RESPOND)

Leave a Reply
You r email address w ill n ot be pu blish ed. Requ ired fields are marked *

Name *

Email *

Website

21 of 22 28-05-2019, 15:11
Cross platform migration using transportable tablespace 12c with zero d... https://dbaclass.com/article/cross-platform-migration-using-transportable...

Post Comment

@Tw itterDBA Privacy policy (/privacy-policy)


  
(h ttp://w w w .tw itter.com
/Tw itterDBA) h ttps://t.co Terms & Con dition s (/terms)
(https://www.facebook.com
(https://twitter.com
(https://www.linkedin.com
/iMfh ff4h 6d (h ttps://t.co
/iMfh ff4h 6d) Con tact u s (/con tact-u s)
/dbaclass)
/SupportDbaclass)
/in/dbaclass) Friday Oct 28 - 8:28am
Abou t Us (/abou t)
(https://twitter.com/SupportDbaclass
/status/791919577743581185)
W rite for u s
About DBACLASS (h ttps://dbaclass.com/w ork-
@Tw itterDBA
w ith -u s/)
(h ttp://w w w .tw itter.com
DBACLASS.CO M is a
/Tw itterDBA) h ttps://t.co
kn ow ledgebase for O racle Q&A Foru m
/xBW FtD3lga (h ttps://t.co
Database admin istrators (h ttp://foru m.dbaclass.com)
/xBW FtD3lga)
Friday Oct 28 - 8:27am
(https://twitter.com/SupportDbaclass
/status/791919241993740289)

Follow @su pportdbaclass


(h ttp://tw itter.com
/su pportdbaclass) on Tw itter

©Copyright 2016 The DbaClass Group ®ALL RIGHTS RESERVED.

22 of 22 28-05-2019, 15:11

You might also like