oracle 重建索引
按用户拼接重建索引的sql
select 'alter index ' ||d.owner||'.'|| d.index_name || ' rebuild;'
from dba_indexes d
where d.owner in ('用户名1', '用户名2')
AND d.table_name not like '%$%' and d.index_name not like '%$%';
按用户拼接重建索引的sql
select 'alter index ' ||d.owner||'.'|| d.index_name || ' rebuild;'
from dba_indexes d
where d.owner in ('用户名1', '用户名2')
AND d.table_name not like '%$%' and d.index_name not like '%$%';