首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将大型表列类型Long更改为Clob

将大型表列类型Long更改为Clob
EN

Stack Overflow用户
提问于 2014-02-20 11:52:06
回答 1查看 320关注 0票数 1

背景:我想将表格列从Long更改为Clob。

  • 不允许创建/更改表空间
  • 这个表有10米以上的行

我试过的是:

  1. 只需将表从long更改为clob:
代码语言:javascript
复制
- returns full tablespace error - `ORA-01652`: `"unable to extend temp segment by %s in tablespace %s"`

  1. 从表中导出数据并插入新表:
代码语言:javascript
复制
- export just takes too long, at the speed its going now, it will take weeks to export. 

  1. 运行"insert /*+ APPEND */ into new_table select * from old_table;"
代码语言:javascript
复制
- returns an error -  `ORA-00997: "illegal use of LONG datatype"`

EN

回答 1

Stack Overflow用户

发布于 2014-03-07 15:02:22

只是另一个选择。(在预制作之前总是进行测试)

  • 创建一个将长时间转换为阻塞的函数
  • 然后使用以下函数尝试您的第三个选项: 将/*+附加*/插入new_table select id,long_to_clob(myLob)作为old_table的myclob;
  • 丢下那片长田。
  • 添加一个新的clob字段。
  • 更新新字段。 更新old_table o SET new_field =(从newTable n选择myclob,其中选择n.id = o.id);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21906978

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档