码迷,mamicode.com
首页 > 数据库 > 详细

oracle导出表不全解决办法

时间:2016-08-02 19:04:37      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:

  • 原因
    从dbatables查询导不出的表,会发现他们不占用空间,segmentcreated=‘NO‘
  • 解决办法
    查询出来这些表,执行
    alert table xxx move;
    即可

declare
tbl varchar2(100);
s varchar2(1000);
cursor c is
select t.TABLENAME from dbatables t where t.OWNER=‘MES‘ and t.SEGMENTCREATED = ‘NO‘ and t.TABLENAME!=‘SQLNEXPLAINPLAN‘ and t.TABLE_NAME! =‘Sheet1$‘;
begin

open c;
fetch c into tbl;
while(c%FOUND)loop
s := ‘alter table ‘ || tbl || ‘ move ‘;
execute immediate s;
fetch c into tbl;
end loop;

close c;
end;

oracle导出表不全解决办法

标签:

原文地址:http://www.cnblogs.com/blaast/p/5730259.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!