ITPub博客

首页 > 数据库 > Oracle > ORACLE 11G XMLTYPE 迁移切换

ORACLE 11G XMLTYPE 迁移切换

原创 Oracle 作者:zhongguo87 时间:2015-05-22 17:42:12 0 删除 编辑
xmltype 迁移切换的过程 着实让我郁闷了很久,但是最终解决还是好的,方案已经验证OK了,

针对 xmltype的表 导出的时候有诸多的限制,因为xml的内容格式还是比较多样,oracle 官方也经常修修补补,但还是有漏网之鱼,所以 以后想要迁移xmltype的表,优先建议的步骤是:
一、先转成clob字段,
    例如: create table xxx_clob_tab as select t.xmltypecol.getclobval() xxx_clob  from sourceXMLTab

二、expdp/impdp the xxx_clob

三、convert to xmltype
   注意:在转换之前必须建创建的session 设置一下:

Disable BINARY XML storage and switch to CLOB based storage. The following event can be set at the destination host:
1、alter system set events '31156 trace name context forever, level 0x400'; 

then covert it to xmltype
2 、create table xxx_xml as  select sys.xmltype.createXML(clob column)  as  xmlcol from xxx_clob_tab


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

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-08-22

  • 博文量
    10
  • 访问量
    11978