(5109/2028 22:26 Document 371556.1
CCopytlght(€) 2023, ade, Al rights reserved, Orade Confidential
How to Migrate to different Endian Platform Using Transportable Tablespaces With RMAN
(Doc ID 371556.1)
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.2.0.1 [Release 12.1 to 12.2]
Oracle Database - Enterprise Edition - Version 9,2.0.3 to 9.2.0.3 [Release 9.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.
Jeedooreanneocoee WARNING HeeeEEEaHHo
Document 1334152.1 Corrupt IOT when using Transportable Tablespace to HP from different OS
Document 13001379.8 Bug 13001379 - Datapump transport_tablespaces produces wrong dictionary metadata for some
tables
Starting with Oracle Database 10g, you can transport tablespaces across platforms. In this
note there is a step by step guide abou do it with ASM datafiles and with os
filesystem datafiles
If your goal is to migrate a database to different endian platform, the folloi
level steps describe now to migrate a data
tablespace:
se to a new platform using tr
Create a new, empty database on
Import objects required for transpo:
ination database
Export transportable met 2 80
Transfer data files for user § to the destination system.
Use RYAN to convert the data
Import transportable metadata
1 endian format of the destination systen.
usez tablespaces into the destina’
You could also convert the datafiles at sour:
to destination platform.
e platform and once converted
‘The MAA technical brief "Platform Migration Using Transportable Tablespace'" is available at
hi
:/ wus. oracie..con/technetuork/database/ features /avai labi lity/naa-wp-11g-platformmi grationtts-120269.pdf
From 11.2.0.4, 12C and further, if converting to Linux x86-64 consider to follow this dac:
Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup [1389592.1
For 12c you can also refer
12c How Perform Cross-Platform Database Transport to different Endian Platform with RMAN
Backup Sets Document 2013271.1
Supported platforms
hitps:isupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state-slgjcO2Kt_SS8id=371556.1 18050912023 22:36, Document 371555.1
You can query the VSTRANSPORTABLE_PLATFORM view to see the platforms that are supported and to determine each
platform's endian format (byte ordering).
soL> cou
SoL> si
vil ELATEORM_NAME FORMAT A32
ECT * FROM V@TRANSPORTABLE PLATFORM;
PLATFORM_ID PLATFORM_NAM
Solaris(tm) of (32 Big
solaris(tm) OE (64-b Big
Microsoft Windows IA (32-pi Little
Linux IA (32-bit) Little
id Systems ( Big
(e4-pit) Big
Little
Big
Little
Late.
9 TEM 25 Big
Linux 64-bse Little
Apple Mac 05 Big
Wierosoft Windows 64-bit for AND Little
Solaris Operating System (x86) Little
If the source platform and the target platform are of different endianness, then an additional step must be done on either
the source or target platform to convert the tablespace being transported to the target format. If they are of the same
endianness, then no conversion is necessary and tablespaces can be transported as if they were on the same platform.
Transporting the tablespace
1. Prepare for export of the tablespace.
© Check that the tablespace will be self contained:
80
sys-dbms
«from sys.transport. set vi
Note: these violations must be resolved before the tablespaces can be transported.
© The tablespaces need to be in READ ONLY mode in order to successfully run a transport tablespace export:
2, Export the metadata.
© Using the original export utility:
SPACE TBS1 ABAD
ESPACE TBS? READ ON
exp userid-\"sys/sys as sysdba\' file-ths exp.dup 1
transport_tablespace-y tablespaces=TBS1, TBS2
exp.log
© Using Datapump export:
First create the directory object to be used for Datapump, like in
CREATE OR REPLA
SECTORY dpunp_diz AS ‘/tmp/subdiz*
ON DIRECTORY dpune dir TO system:
Then initiate Datapump Export:
expdp system/password DUMP!
TBSL, TSS2
fexpdat.dnp DIRECTORY-dpump_i
ANSPORT_TABLESPAC
If you want to perform a transport tablespace operation with a strict containment check, use the
‘TRANSPORT_FULL_CHECK parameter:
If the tablespace set being transported is not self-contained then the export will fal
hitps:isupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state-slgjcO2Kt_SS8id=371556.1 218(5109/2028 22:26 Document 371556.1
3, Use V8TRANSPORTABLE_ PLATFORM to determine the endianness of each platform, You can execute the following
query on each platform instance:
ROM VSTRAN:
tp.platform id, subste (d-PuATFORY NAME, 1,30), ENDIAN FORMAT
SPORTABLE PLATFORM tp, VSDATABASE d
ATFORM_NAME;
If you see that the endian formats are different and then a conversion is necessary for transporting the tablespace
set:
RMAN> conv orm="Linux IA (32-bit) " FORMAT '/tmp/tU'y
RMAN> convert tablespace to platform="iinux IA (32-bit)" FORMAT '/emp/sU
‘Then copy the datafiles as well as the export dump file to the target environment,
4, Import the transportable tablespace.
© Using the original import utility
as sysdba’
y
‘transpo!
© Using Datapump:
CREATE OR REPLACE DIRECTORY dpume dir AS '/tmp/subdir';
GRANT READ,WRITE ON DIRECTORY dpup_dir 10 systems
Followed by:
impdp systen/password DUMi expdat.dnp DIRECTORY-dpump_di
TRA +, "femp/...1 REMAP_SCHEMA~(Source:target) REMAP_SCKEMA~
SPORT_DMTAPILES~' /emp/
eget_schena_sch2)
(souree_seh2:t
You can use REMAP_SCHEMA if you want to change the ownership of the transported database objects.
5. Put the tablespaces in read/write mode:
SQL> ALTER TABLESPACE TBS1 READ WRITE;
SQL> ALTER TABLESPACE 1BS2 READ WRITE;
Using DBMS_FILE_TRANSFER
You can also use DBMS_FILE_TRANSFER to copy datafiles to another host.
From 12c and in 11,2.0,4 DBMS_FILE_TRANSFER does the conversion by default. Using DBMS_FILE_TRANSFER the
destination database converts each block when it receives a file from a platform with different endianness. Datafiles
can be imported after they are moved to the destination database as part of a transportable operation without RMAN
conversion,
In releases lower than 1.2.0.4 you need to follow the same steps specified above for ASM files. But if the endian formats
are different then you must use the RMAN convert AFTER transfering the files. The files cannot be copied directly between
two ASM instances at different platforms.
This is an example of usage:
RMAN> CONVERT 0:
‘/path/ths 31.2
"ypath/ ths _32
‘/path/ ths 42.£
10 PLATFORN-"Solaris{tm] Of (3
"ROM PLATEORN="H? TRUG4 UNIX"
DB FILE NAME CONVER?= "/path source/
PARALLELISU=S;
") “ipath dest /™
‘The same example, but here showing the destination being an +ASM diskgroup:
hitps:isupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state-slgjcO2Kt_SS8id=371556.1 38asina2022 22:96, Document 371556.1
408 WARNING ***
+ Index Organized Tables (IOT) can become corrupt when using Transportable Tablespace (TTS)
from Solaris, Linux or AIX to HP/UX.
This is a restriction caused by BUG:9816640.
Currently there is na patch for this issue, the Index Organized Tables (OT) need to be recreated
after the TTS.
‘See Document 1334152,1 Corrupt IOT when using Transportable Tablespace to HP from different
os.
When using dropped columns, Bug:13001379 - Datapump transport_tablespaces produces wrong
dictionary metadata for some tables can occur.See Document 1440203.1 for details on this alert.
Known issue Using DBMS_FILE_TRANSFER
=> Unpublished Bug 13636964 - ORA-19563 from RMAN convert on datafile copy transferred with
DBMS_FILE_TRANSFER (Doc ID 13636964.8)
Versions confirmed as being affected
1.2.03
This issue is fixed in
12.1.0.1 (Base Release)
1.2.0.4 (Future Patch Set)
Description
A file transferred using DBMS_FILE_TRANSFER fails during an RMAN convert
operation.
eg:
RMAN-00569:
RMAN-0057:
RMAN-03002: failure of conversion at target command at 01/24/2012 16:22:23
‘ORA-19563: cross-platform datafile header validation failed for file +RECO/tbs_9.tF
RROR MESSAGE STACK FOLLOWS
Rediscovery Notes:
If RMAN convert fails on a file transferred using DBMS_FILE_TRANSFER
then it may be due to this bug
Workaround
Transfer the file using OS facilities.
=> Dbms_file_transfer Corrupts Dbf File When Copying between endians (Doc ID 1262965.1)
Additional Resources
hitps:Isupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state=slejcO2kt_ 568i
371556. 48(5109/2028 22:26 Document 371556.1
‘Community: Database Utilities
Still have questions? Use the above community to search for similar discussions or start a new discussion on this subject.
Limitations on Transportable Tablespace Use
1, The source and target database must use the same character set and national character set.
2. You cannot transport a tablespace to a target database in which a tablespace with the same name already exists.
However, you can rename either the tablespace to be transported or the destination tablespace before the transport
operation.
3. Objects with underlying objects (such as materialized views) or contained objects (such as partitioned tables) are
not transportable unless all of the underlying or contained objects are in the tablespace set.
© Review Table "Objects Exported and Imported in Each Mode from the Oracle Database Utilities
documentation, there are several object types that are not exported in tablespace mode
4. If the owner/s of tablespace objects does not exist on target database, the usernames need to be created manually
before starting the transportable tablespace import.
© If you use spatial indexes, then:
= be aware that TTS across different endian platforms are not supported for spatial indexes in 10gR1
and 10gR2; such a limitation has been released in 11g
' specific Spatial packages must be run before exporting and after transportation, please see Oracle
Spatial documentation.
5, Beginning with Oracle Database 11g Release 1, you must use only Data Pump to export and import the tablespace
metadata for tablespaces that contain XMLTypes.
‘The following query returns a list of tablespaces that contain XMLTypes:
Bel_tables x, dba_u:
execute sys. ansport_set_check("TBS1,7252", trae);
hitpsiisupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state-slgjcO2Kt_SS8id=371556.1 58(5109/2028 22:26 Document 371559.1
SOL> select * from sys.transport_set_violations;
Note: these violations must be resolved before the tablespaces can be transported.
= The tablespaces need to be in READ ONLY mode in order to successfully run a transport tablespace
export:
SQL> ALTER TABLESPACE TSS1 READ ONLY;
SQL> ALTER TABLESPACE 1852 READ ONLY;
2. Export the metadata,
= Using the original export utility:
‘sys/sys as sysdba\' file=ths_exp.dmp 1o¢
exp users =
-TBS1, TBS2
transport _tablespace-y tablespac:
= Using Datapump Export:
CREATE OR REPLACE DIRECTORY cpunp_dir AS '/tmp/subdix's
GRANT READ, WRITE ON DIRECTORY dpump_dir TO systems
followed by:
expdp system/password DUMPPILE-expdat dnp DIRECTORY-dpump_dir
TRANSPORT_TABLESPACES = TRS1,TBS2
If you want to perform a transport tablespace operation with a strict containment check, use the
‘TRANSPORT_FULL_CHECK parameter:
expdp systen/password DUMPPILE~expdat .dmp DIRECTORY ~ dpunp_dir
‘TRANSPORT_TABLESPACES= TBS1,"BS2 TRANSPORT_PULL._CHEC:
If the tablespace set being transported is not self-contained, then the export will fail,
3. Use V$TRANSPORTABLE PLATFORM to find the exact platform name of target database. You can execute
the following query on target platform instanc
SELECT tp.platform id, substr (d.PLATFORM NAME, 2,30), ENDIAN FORMAT
FROM VSTRANSPORTABIE_PLATEORM tp, VSDATABASE @
WHERE tp. PLATFORM NAME = d.PLATFORM NAME?
4. Generate an OS file from the ASM file, in target platform format:
RYAN> CONVERT TABLESPACE T3S1
TO PLATFORM ‘HP-UX (64-bit) FORUAT */tmp/4U"s
RWAN> CONVERT TABLESPACE T3S2
TO PLATEORY THP-UX (64-bit) " FORMAT */emp/4U";
5. Copy the generated fie to target server if different from source.
6. Import the transportable tablespace
= Using the original import utility:
imp useride\‘ays/sys as sysdba\" file=tbs
transport_tablespacesy datafiles="/emp/
= Using Datapump Import:
sxp.dnp log=tha_imp.1og
SE emps
CREATE OR REPLACE DIRECTORY dpump_dir AS '/tmp/subdir';
GRANT READ, WRITE ON DIRECTORY dpunp_dir TO systems
followed by:
impdp system/password DUMPFILE-expdat dnp DIRECTORY-dpump_air
TRANSPORT_DATAFILES="/tmp/....','/tmp/...' REVAP_SCHEMA= (Source: target)
REMAP_SCHEMA-(souree_sch2:target_schema sch2)
‘You can use REMAP_SCHEMA if you want to change the ownership of the transported database
objects,
7. Put the tablespaces in read/write mode:
SQL> ALTER TABLESPACE TRS] READ WRITE:
SQL> ALTER TABLESPACE TRS READ WRITE:
hitps:isupportoracle.comfepmosifaces/DacumentDisplay?_adtct-staterslgjcO2Kt_S68id=371558.1 28(5109/2028 22:26 Document 371556.1
If you want to transport the datafiles from ASM area to filesystem, you have finished after the above steps.
But if you want to transport tablespaces between two ASM areas you must continue.
8. Copy the datafile /tmp/....dbf" into the ASM area using rmar
cman g target /
RGN> backup as copy datafile '/tmo/....dbf! format '+2GROUPA';
where +DGROUPA is the name of the ASM diskgroup.
9. Switch the datafile to the copy.
If the 109 database is open you need to offline the datafile first:
2 datafile '/tmp/....dbf* offline:
Note down the name of the copy created in the +DGROUPA diskgroup, ex.
“+DGROUPA/s101/datafile/tts.270.5'.
10. Put the datafile online again, we need to recover it first:
recover datafile '
ROUPA/SID/datafile/cts.270.5'2
fe '+DGROUPA/SID/ datafile:
SQL> alter database dataf
1. Check if datafile is indeed part of the ASM area and online:
5 from vSdatafile;
The output should be:
+OGROUPA/S1D/datafile/cts.270.5
+ Using DBMS_FILE_TRANSFER
You can also use DBMS_FILE_TRANSFER to copy datafiles from one ASM disk group to another, even on another
host. Starting with 10g release 2 you can also use DBMS_FILE_TRANSFER also to copy datafiles from ASM to
filesystem and to filesystem to ASM,
‘The PUT_FILE procedure reads 2 local fle or ASM and contacts a remote database to create @ copy of the file in the
remote file system, The file that is copied is the source file, and the new file that results from the copy is the
destination file. The destination file is not closed until the procedure completes successfully,
Syntax:
DBMS_FILE_TRANSFER. PUT_?’
IN VARCHAR2,
source VARCHAR?
destinati object IN VARCHAR2,
destination file name N VARCHAR2,
destination database IN VARCHARZ) +
Where:
© source_directory_object: The directory object from which the file is copied at the local source site. This
directory object must exist at the source site.
© source_file_name: The name of the file that is copied from the local file system. This file must exist in the
local file system in the directory associated with the source directory object.
© destination_directory_object: The directory abject into which the file is placed at the destination site. This
directory object must exist in the remote file system.
© destination_file_name: The name of the file placed in the remote file system. A file with the same name
must not exist in the destination directory in the remote file system.
© destination_database: The name of a database link to the remote database to which the file is copied.
If we want to use DBMS_FILE_TRANSFER.PUT_FILE to transfer the file from source to destination host, the steps
3,4,5 should be changed by the following:
1. Create a directory at target database host, and give permissions to local user. This is the directory object into
which the file is placed at the destination site, it must exist in the remote file system:
hitpsiisuppororacle.comepmosfaces/DocumentDispay?_adct-stateslec92Kt_S88id=371558.1 78(5109/2028 22:26 Document 371556.1
CREATE OR REPLACE DIRECTORY target_dir AS *
GRANT WRITE ON DIRECTORY
2. Create a directory at source database host. The directory object from which the file is copied at the local
source site. This directory object must exist at the source site:
ROUER'
GRANT READ, WRITE ON OTR:
3. Create a dblink to connect to target database host:
ear
where target_connect is the connect string for target database and USER is the user that we are going to
use to transfer the datafiles.
4, Connect to source instance, The following items are used:
= dbs1: Connect string to source database
= dbs2: dblink to target database
= al.dat: Filename at source database
= 24.dat: Filename at target database
CONNEC? user/passwordedds1
dat to af.dat (using absz
el 2 sub dir to parent dir
~ user has read privs on
= in doe2
ak
ource dir_1 at dhal and write on target_dir
am RANSPER.PUT_PILE( source dir_1', tal.dat',
trarget_dir™, ‘ad.dat", ‘dbs2" );
BUG:9816640 - ORA-600 [6200] ORA-600 [KDDUMMY_BLKCHK] IOT CORRUPTION CODE 6401 AFTER TTS
NOTE:1493809,1 - How to Move a Database Using Transportable Tablespaces
http://www. oracle.com/technetwork/database/features/availability/maa-wp-119-platformmigrationtts-129269.pdt
{UG:13001379 - DATAPUMP TRANSPORT_TABLESPACES PRODUCES WRONG METADATA FOR SOME TABLES
hhttp://docs.oracle.com/cd/E16655 O1/appdev.121/e17602/d ftran.htmi#CHDEFEGG
NOTE:1389592.1 - 11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
NOTE:1989198.1 - TTS changed XMLTYPE from CLOB to Binary, XML Tag Syntax are Changed
Didnt find what you are looking for?
hitps:isupportoracle.comfepmosifaces/DacumentDisplay?_adt ct-state-slgjcO2Kt_SS8id=371556.1 38