Want to quickly copy thousands of tables from one Oracle database to another in just 5 minutes — even with millions of rows per table, and even across different platforms? It's possible, and here's how.

In Oracle, all tables reside in tablespaces, and each tablespace has one or more datafiles attached to it. From Oracle 9i onwards, Oracle introduced transportable tablespaces — you can transport a tablespace along with its datafiles from one Oracle database to another.
Migrating a tablespace involves creating a transportable tablespace set and integrating it into the target database. Here's a detailed guide.
SELECT * FROM V$TRANSPORTABLE_PLATFORM;On the source database, make the tablespace read-only to ensure data consistency during export.
ALTER TABLESPACE tablespace_name READ ONLY;
Use the Data Pump Export (expdp) utility to export metadata for the tablespace.
expdp system/password DIRECTORY=dp_dir DUMPFILE=tablespace.dmp LOGFILE=tablespace.log TRANSPORT_TABLESPACES=tablespace_name
Manually copy the physical data files from the source server to the target server. Locate them with:
SELECT FILE_NAME FROM DBA_DATA_FILES WHERE TABLESPACE_NAME = 'tablespace_name';
Then transfer with a secure copy tool:
scp /source_path/file_name.dbf user@target_host:/target_path
On the target database, use Data Pump Import (impdp):
impdp system/password DIRECTORY=dp_dir DUMPFILE=tablespace.dmp LOGFILE=tablespace_import.log TRANSPORT_DATAFILES='/target_path/file_name.dbf'
TRANSPORT_DATAFILES: the location of the copied data files.
ALTER TABLESPACE tablespace_name READ WRITE;
Validate objects with:
SELECT * FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'tablespace_name';
Then confirm that applications or users can access the data without issues.
If the tablespace is no longer required on the source database, drop it:
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;
Scenario: Source database ORCL_SRC, target database ORCL_TGT, tablespace USERS_DATA, data file at /u01/app/oracle/oradata/ORCL_SRC/users_data01.dbf, Oracle directory DATA_PUMP_DIR.
ALTER TABLESPACE USERS_DATA READ ONLY;expdp system/password DIRECTORY=DATA_PUMP_DIR DUMPFILE=users_data.dmp LOGFILE=users_data.log TRANSPORT_TABLESPACES=USERS_DATAimpdp system/password DIRECTORY=DATA_PUMP_DIR DUMPFILE=users_data.dmp LOGFILE=users_data_import.log TRANSPORT_DATAFILES='/u01/app/oracle/oradata/ORCL_TGT/users_data01.dbf'ALTER TABLESPACE USERS_DATA READ WRITE;SELECT * FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'USERS_DATA';The USERS_DATA tablespace is successfully migrated from ORCL_SRC to ORCL_TGT, ensuring seamless data availability on the target database.
This method provides a robust and efficient way to migrate tablespaces between Oracle databases while minimizing downtime.