1. 程式人生 > >oracle11G備份空表解決辦法

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