orareindex – Recreating indexes/constraints

Purpose

orareindex recreates/rebuilds all indexes and unique constraints in an Oracle database schema.

Options

orareindex supports the following options:

connectstring

An Oracle connectstring.

-v <flag>, --verbose <flag>

Produces output (on stderr) while the database is read or written. (Valid flag values are false, no, 0, true, yes or 1)

-c <mode>, --color <mode>

Should the output (when the -v option is used) be colored? If auto is specified (the default) then the output is colored if stderr is a terminal. Valid modes are yes, no or auto.

-x <flag>, --execute <flag>

When the -x argument is given the SQL script isn’t printed on stdout, but is executed directly in the schema specified via the connectstring option. (Valid flag values are false, no, 0, true, yes or 1)

-r <flag>, --rebuild <flag>

If given, the script uses ALTER INDEX ... REBUILD to rebuild indexes instead of dropping and recreating them. (Valid flag values are false, no, 0, true, yes or 1)

--format <format>

If --execute is not given, this determines the output format: Plain SQL (format sql), or PySQL (format pysql) which can be piped into ll.pysql.