Transportable tablespaces

March 2nd, 2012
-- check if TTS are self-contained
exec dbms_tts.transport_set_check( 'EBI_PROV_OTR1_DAT, EBI_PROV_OTR1_IDX, EBI_STORE_OTR1_DAT, EBI_STORE_OTR1_IDX', true );

select * from TRANSPORT_SET_VIOLATIONS;

-- put TTS in read-only mode
alter tablespace EBI_STORE_OTR1_DAT read only;
alter tablespace EBI_STORE_OTR1_IDX read only;

-- Run export of metadata of transportable tablespaces
expdp \'\/ as sysdba\' DUMPFILE=BIPD_dat.dmp DIRECTORY=EXPD TRANSPORT_TABLESPACES=EBI_PROV_OTR1_DAT,EBI_PROV_OTR1_IDX,EBI_STORE_OTR1_DAT,EBI_STORE_OTR1_IDX,EBI_PROV_OTR2_DAT TRANSPORT_FULL_CHECK=Y logfile=EXPD:expdp_bipd_20110321.log

-- copy TTS datafiles to destination host
scp 

-- put TTS in read-write mode
alter tablespace EBI_STORE_OTR1_DAT read write;
alter tablespace EBI_STORE_OTR1_IDX read write;

-- import TTS on destination database
impdp user/password parfile=imp_datafiles.par exclude=statistics directory=ebi_export logfile=imp_datafile.log
 
imp_datafiles.par:
transport_datafiles=(
 /oracle/BIUAT/oradata12/BIPD/ebi_prov_otr1_dat01.dbf
,/oracle/BIUAT/oradata15/BIPD/ebi_store_otr1_idx03.dbf
,/oracle/BIUAT/oradata15/BIPD/ebi_store_otr1_idx04.dbf)

Comments are closed.