############################################################ # set_index.ksh 1.13 02/08/29 08:01:13 ############################################################ # Usage: # set_index [-d ] {-off|-on} [-nostats|-stats] {tabname ...} # # Comments: # This script sets the object mode of contraints and # indexes on a table(s) either ENABLED or DISABLED. # The Informix environment must already be set. # Optionally, the DBNAME environment variable will be used # if set and the -d parameter is not used. # As alternatives to -on/-off, the following synonyms are # accepted: # [-]1, [-]enable[d] = -on # [-]0, [-]disable[d] = -off # The parameter -nostats will stop the generation of # statistics if indexes are being enabled. It will be # ignored when disabling indexes. The reverse function # forces statistics to be rebuilt, regardless of which # mode is being set. # The default behaviour is for statistics to be rebuilt # when indexes are being switched on. The contents of # sysobjstate are checked to see whether any indexes are # currently disabled - in other words, while the command # to enable indexes in always run, the prior state of the # indexes determines whether statistics need to be built # or not. # Author: Richard Thomas ############################################################