More DBA job interview questions and answers at
http://dba.fyicenter.com/Interview-Questions/
(Continued from previous question...)
Oracle DBA Checklist - Weekly Procedures - mkrebuild_idx.sql
-- mkrebuild_idx.sql
--
-- Rebuild indexes to have correct storage parameters
SELECT 'alter index ' || index_name || ' rebuild '
, 'tablespace INDEXES storage '
|| ' ( initial 256 K next 256 K pctincrease 0 ) ; '
FROM all_indexes
WHERE ( tablespace_name != 'INDEXES'
OR next_extent != ( 256 * 1024 )
)
AND owner = '&OWNER'
/
(Continued on next question...)