impdp 把表数据和索引分别导入不同的表空间

impdp 把表数据和索引分别导入不同的表空间

一、数据导出
expdp test/test directory=dump_dir dumpfile=test.dmp logfile=test_expdp.log tables=userinfo
——利用expdp 语句导出具体数据,如果是导出整个用户下数据,去掉 tables 参数

二、把数据导入数据表空间
impdp test/test directory=dump_dir dumpfile=test.dmp logfile=impdp_data.log remap_tablespace=system:datatb exclude=index
注释:
remap_tablespace=system:datatb ——更换数据的原system表空间为datatb数据表空间
exclude=index ——导入过程中不创建索引,导入除索引外的其它所有对象

三、把索引创建到指定的索引表空间
impdp test/test directory=dump_dir dumpfile=test.dmp logfile=impdp_index.log remap_tablespace=system:idxtb include=index
注释:
remap_tablespace=system:idxtb 更换索引表空间
include=index 创建索引,仅仅导入索引

四、查询确认
select segment_name,tablespace_name from dba_segments where owner=‘TEST’;
通过以上语句确认表数据和索引数据是否导入到指定的表空间中。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26589291/viewspace-1665331/,如需转载,请注明出处,否则将追究法律责任。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值