oracle11G备份空表解决办法

批量执行空表更新语句

A: 查询当前用户下的所有记录数为空的表

select TABLE_NAME from user_tables t where t.NUM_ROWS = 0 or t.NUM_ROWS is null;

B:生成修改语句,将SEGMENT_CREATED 修改为YES

select 'alter table '||table_name||' allocate extent;' from user_tables t where t.NUM_ROWS = 0 or t.NUM_ROWS is null;

\

C:执行生成的语句即可

 

文章原地址:https://www.2cto.com/database/201703/615378.html

posted @ 2018-11-13 16:51  BestTarry  阅读(369)  评论(0编辑  收藏  举报