Transportable Tablespaces (TTS) Migration – Step-by-Step
Transportable Tablespaces (TTS) is a powerful Oracle migration technique used to move large datasets quickly by transporting datafiles instead of exporting rows.
The migration mainly uses:
- Data Pump → for metadata
- Datafile copy → for actual data
- RMAN CONVERT → only when source and target platforms have different endian formats
Below is the complete step-by-step process, where the RMAN conversion step is included when required.
Step 1 — Check Platform Compatibility
First determine whether the source and target platforms have the same endian format.
SELECT platform_name, endian_format
FROM v$transportable_platform
ORDER BY platform_name;
Examples:
| Platform | Endian |
|---|---|
| Linux x86 64-bit | Little |
| Solaris | Big |
Interpretation:
- Same endian → No RMAN conversion required
- Different endian → RMAN conversion required
Step 2 — Identify Tablespaces to Transport
Identify the tablespaces that will be migrated.
SELECT tablespace_name
FROM dba_tablespaces
WHERE contents='PERMANENT';
Example:
SALES_TS
HR_TS
FINANCE_TS
Note: You cannot transport:
- SYSTEM
- SYSAUX
- TEMP
- UNDO
Step 3 — Verify Tablespaces Are Self-Contained
Oracle requires that transported tablespaces do not reference objects outside the set.
Run the check:
EXEC DBMS_TTS.TRANSPORT_SET_CHECK('SALES_TS,HR_TS', TRUE);
Check violations:
SELECT * FROM transport_set_violations;
If no rows are returned, the tablespaces are safe to transport.
Step 4 — Put Tablespaces in READ ONLY Mode
To ensure consistency during migration.
ALTER TABLESPACE sales_ts READ ONLY;
ALTER TABLESPACE hr_ts READ ONLY;
Step 5 — Export Metadata Using Data Pump
Only metadata is exported.
expdp system/password \
TRANSPORT_TABLESPACES=sales_ts,hr_ts \
DIRECTORY=DATA_PUMP_DIR \
DUMPFILE=tts_meta.dmp \
LOGFILE=tts_export.log
The dump file contains:
- Object definitions
- Tablespace metadata
- Ownership information
Step 6 — RMAN Conversion (Only if Cross-Platform Migration)
If the source and target endian formats differ, convert datafiles using RMAN.
Open RMAN:
rman target /
Run conversion:
CONVERT TABLESPACE sales_ts, hr_ts
TO PLATFORM 'Linux x86 64-bit'
FORMAT '/u02/converted/%U';
This converts the datafile byte order to match the target platform.
If the endian format is the same, this step is skipped.
Step 7 — Copy Datafiles to Target Server
Identify datafiles:
SELECT file_name
FROM dba_data_files
WHERE tablespace_name IN ('SALES_TS','HR_TS');
Example files:
/u01/oradata/prod/sales_ts01.dbf
/u01/oradata/prod/hr_ts01.dbf
Copy files to the target system:
scp sales_ts01.dbf hr_ts01.dbf target_server:/u02/oradata/
If RMAN conversion was performed, copy the converted files instead.
Step 8 — Import Metadata in Target Database
Attach the transported datafiles.
impdp system/password \
DIRECTORY=DATA_PUMP_DIR \
DUMPFILE=tts_meta.dmp \
TRANSPORT_DATAFILES='/u02/oradata/sales_ts01.dbf',
'/u02/oradata/hr_ts01.dbf' \
LOGFILE=tts_import.log
Oracle links the datafiles with the metadata.
Step 9 — Make Tablespaces READ WRITE
After successful import:
ALTER TABLESPACE sales_ts READ WRITE;
ALTER TABLESPACE hr_ts READ WRITE;
Step 10 — Validate the Migration
Check tablespaces:
SELECT tablespace_name, status
FROM dba_tablespaces;
Check invalid objects:
SELECT owner, object_name, status
FROM dba_objects
WHERE status='INVALID';
Compile if required:
@?/rdbms/admin/utlrp.sql
Final Workflow Summary
Same Platform Migration
Check platform
Check self containment
READ ONLY tablespaces
expdp metadata
Copy datafiles
impdp metadata
READ WRITE tablespaces
Cross Platform Migration
Check platform
Check self containment
READ ONLY tablespaces
expdp metadata
RMAN CONVERT tablespace
Copy converted datafiles
impdp metadata
READ WRITE tablespaces
No Comments