Home » Databases » How to: How to copy an Oracle tablespace across platforms – quick and dirty ;-)

How to: How to copy an Oracle tablespace across platforms – quick and dirty ;-)

On the source machine:
Set the tablespace(s) into read only mode

Alter tablespace <tablespace> read only

Export the tablespace meta data using export

expdp system/<password> DUMPFILE=expdat.dmp DIRECTORY = dpump_dir TRANSPORT_TABLESPACES = <list of tablespaces separated by commas> TRANSPORT_FULL_CHECK=Y

If the dumpdir is not set up, you will get an ‘invalid’ directory error:

CREATE DIRECTORY dmpdir as ‘/somedir’;
GRANT read,write on DIRECTORY to system;

Export the data converting on the fly:
Determine the platform name for the destination machine:

SELECT PLATFORM_ID, PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM
rman TARGET /
RMAN> CONVERT TABLESPACE </list><list of tablespaces separated by commas> to PLATFORM ‘<platform name from previous step>’  FORMAT=’/somedir/%U’;
Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect