我原先的数据库的表空间是XMGL,然后我修改了一张表,将其表空间修改为了 WGP,然后导出,然后通过一台服务器,这台服务器的表空间就是 WGP,然后导入就报错
报错说是 XMGL不存在,问题是我原先导出前已经修改了表空间,导出还是原先的表空间,求解,数据库我也重启了,还是不行,求大神!
参考Import: Tablespace does not exist tips
你的表里面有CLOB类型列,它存储在不同的tablespace里面
You can fix the ORA-00959 error in several ways:
Create the tablespace and use IGNORE=Y in the impdp syntax Import into another user ID with a different default tablespace name (fromuser touser) Use include=tablespace if you want to have the import pre-build the same tablespaces
另外你也可以参考oracle 导入报错 ORA-00959: tablespace 'HB' does not exist
总之,如果有CLOB,想创建tablespace
有点乱,原则就是表空间名称要一致。既然你导出的dmp文件中的表空间有XMGL和WGP,那么新的数据库中也应该有这两个表空间。
楼上正解,LOB字段属于一种对象会单独存储,在修改表的表空间时对表中的LOB字段要单独修改。LOB在segment中会产生两条记录,
一个是该LOB的索引所占空间,另一个是对象所占空间,都是需要挪到新的表空间才算是该表全部修改完成。
参照:
alter table [table_name] move lob([lob_column_name]) store as(tablespace [target_tablespace_name])