Oracle 11g 导库导不出空表问题

2015-08-31 19:59:27 · 作者: · 浏览: 39

select * from all_all_tables aa where aa.owner='User名大写' ---查看用户下所有表


select * from all_tables t where t.owner =?'User名大写' and t.num_rows = 0;--查看用户下所有空表


好了,下面是处理方法脚本:


在命令窗口运行:


set heading off;
set echo off;
set feedback off;
set termout on;
spool D:\allocate.sql;
Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
spool off;


运行完成后,把allocate.sql再在命令窗口执行一次,然后就可以用exp语句了,这样空表就能被导出来了