ORACLE 11G XMLTYPE 迁移切换
xmltype 迁移切换的过程 着实让我郁闷了很久,但是最终解决还是好的,方案已经验证OK了,
针对xmltype的表 导出的时候有诸多的限制,因为xml的内容格式还是比较多样,oracle 官方也经常修修补补,但还是有漏网之鱼,所以 以后想要迁移xmltype的表,优先建议的步骤是:
一、先转成clob字段,
例如:create table xxx_clob_tab asselectt.xmltypecol.getclobval() xxx_clob from sourceXMLTab
二、expdp/impdp the xxx_clob
三、convert to xmltype
注意:在转换之前必须建创建的session 设置一下:
针对xmltype的表 导出的时候有诸多的限制,因为xml的内容格式还是比较多样,oracle 官方也经常修修补补,但还是有漏网之鱼,所以 以后想要迁移xmltype的表,优先建议的步骤是:
一、先转成clob字段,
例如:create table xxx_clob_tab asselectt.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 setevents '31156 trace name context forever, level 0x400';
then covert it to xmltype
2 、create table xxx_xmlas select sys.xmltype.createXML(clob column) as xmlcol fromxxx_clob_tab
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。