EXP一个库(表空间是TEST1,USER1)
IMP到另一个库里面(表空间是TEST2,USER2)
在要导入的用户(也就是USER2) 的系统权限中取消掉 unlimited tablespace ,然后指定限额, 指定要导入的表空间(TEST2)。
执行
imp test/test@test2 fromuser=USER1 touser=USER2 file=D:\exp\TEST1.dmp
结果:所有普通的表都导入成功,只有几个分区表没有导入,提示报错说对TEST1表空间没有操作权限。
解决方法:
1. 导入时生成转储文件(indexfile=...),然后手工编辑这个文件,
将tablespace 参数后面的值替换成users
参考:
Q1: Can one import tables to a different tablespace?
A1:
Oracle offers no parameter to specify a different tablespace
to import data into. Objects will be re-created in the tablespace
they were originally exported from.
One can alter this behaviour by following one of these
procedures:
1. Pre-create the table(s) in the correct tablespace:
Imp