在尝试exp/imp操作时遇到转换表空间的一些问题,在网上搜了些帖子,
值得参考:
http://blog.youkuaiyun.com/shashawang/archive/2009/04/09/4059807.aspx
测试:
表spm_sp_info_t在源数据库上是存在TS_TAB_BASE表空间里
而目的数据库上是没有TS_TAB_BASE表空间,smp_owner_user用户默认表空间是cl
imp smp_owner_user/smp_product_user@orcl file=e:/spm_sp_info_t.dmp
SQL> select table_name,tablespace_name from tabs where table_name='SPM_SP_INFO_T';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
SPM_SP_INFO_T CL
SQL> drop table spm_sp_info_t;
表已删除。
在目的数据库上新建TS_TAB_BASE表空间(直接通过Oracle 10g Database Control 在页面上配置)
重新imp smp_owner_user/smp_product_user@orcl file=e:/spm_sp_info_t.dmp
SQL> select table_name,tablespace_name from tabs where table_name='SPM_SP_INFO_T';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
SPM_SP_INFO_T TS_TAB_BASE
SQL> drop table spm_sp_info_t;
表已删除。
SQL> conn /as sysdba
已连接。
SQL> revoke unlimited tablespace from smp_owner_user ;
撤销成功。
再imp smp_owner_user/smp_product_user@orcl file=e:/spm_sp_info_t.dmp时提示错误:
IMP-00003: 遇到 ORACLE 错误 1536
ORA-01536: 超出表空间 'CL' 的空间限额
成功终止导入, 但出现警告。
SQL> alter user smp_owner_user quota unlimited on cl;
用户已更改。
重新imp smp_owner_user/smp_product_user@orcl file=e:/spm_sp_info_t.dmp
SQL> select table_name,tablespace_name from tabs where table_name='SPM_SP_INFO_T';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
SPM_SP_INFO_T CL