Rebuild Indexes
- This CMD/SQL script will read the data dictionary, generate, and run a script to rebuild all non-SYS non-SYSTEM indexes in the database. The CMD file can be scheduled from the O/S scheduler for unattended off-hours execution.
Download rebuild_all_indexes.zip (1K)
- This NT command-line executable will connect to the specified Oracle instance, perform the necessary "ANALYZE INDEX owner.index_name VALIDATE STRUCTURE" and "SELECT del_lf_rows/lf_rows FROM index_stats" statements, then output to STDOUT the "ALTER INDEX owner.index_name REBUILD TABLESPACE tablespace_name" commands. Simply redirect output to a filename to create the necessary script, then run the produced script from the same job. This utility can be run each time to generate a "refreshed" index rebuild script, or the utility can be run once every few months to get a refreshed script while the script itself is run weekly or monthly. The utility is self-documenting (simply type it's name at the command line with no parameters to display the help text), and can be included in a CMD file scheduled from the O/S scheduler for unattended off-hours execution. The utility uses the Oracle7 OCI, and the source code is provided so that the utility can be re-compiled under various Unix brands when required.
Download rbindex7_105.zip (version 1.05, 34K)