transportable tablespace: Oracle 10.2.0.4 -> 11.2.0.3

Source database:

   oracle 10.2.0.4 for linux X-64

  SID:orcl

 datafile location: /u01/app/oracle/oradata/orcl

Destination database:

 oracle 11.2.0.3 for linux x-64

SID:orcl

datafile location :+DATA

 

Testing scenario:

 

 source:

--create tesing environment

sqlplus / as sysdba

create tablespace tts_1 datafile '/u01/app/oracle/oradata/orcl/tts_1.dbf' size 100m;

create user tts identified by tts default tablespace tts_1;

grant connect,resource,select any dictionary to tts;

conn tts/tts

create table all_obj as select * from dba_objects;

 

--set the tablespace to read only

conn / as sysdba

alter tablespace tts_1 read only;

 

--create a directory to store expdp metadata

conn / as sysdba

create directory PUMP_TEST as '/tmp/pump_test';

grant read,write on directory PUMP_TEST to tts;

--expdp
expdp system/oracle directory=PUMP_TEST dumpfile=tts.dmp logfile=tts.log TRANSPORT_TABLESPACES=tts_1
 

--copy dumpfile and datafile
scp /tmp/pump_test/tts.dmp 10.1.61.171:/tmp
scp /u01/app/oracle/oradata/orcl/tts_1.dbf 10.1.61.171:/tmp

 

Desination database:
--create tesing environment
sqlplus / as sysdba
create user tts identified by tts default tablespace users;
grant connect,resource,select any dictionary to tts;

--copy datafile to ASM
asmcmd
cp /tmp/tts_1.dbf +DATA/ORCL/DATAFILE

--create directory to put the dump file;
mkdir -p /tmp/pump_test
sqlplus / as sysdba
create directory pump_test as '/tmp/pump_test';
grant read,write on directory pump_test to tts;

--mv the dump file to /tmp/pump_test
cd /tmp
mv tts.dmp pump_test

--impdp
impdp system/oracle directory=pump_test dumpfile=tts.dmp TRANSPORT_DATAFILES=+DATA/ORCL/DATAFILE/tts_1.dbf

--make both tablespaces in source database and the destination database read write
alter tablespace tts_1 read write;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值