orareindex – Recreating indexes/constraints
Purpose
orareindex recreates/rebuilds all indexes and unique constraints in an Oracle database schema.
Options
orareindex supports the following options:
- -v <flag>, --verbose <flag>
Produces output (on stderr) while the database is read or written. (Valid flag values are
false
,no
,0
,true
,yes
or1
)
- -c <mode>, --color <mode>
Should the output (when the
-v
option is used) be colored? Ifauto
is specified (the default) then the output is colored if stderr is a terminal. Valid modes areyes
,no
orauto
.
- -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 theconnectstring
option. (Valid flag values arefalse
,no
,0
,true
,yes
or1
)
- -r <flag>, --rebuild <flag>
If given, the script uses
ALTER INDEX ... REBUILD
to rebuild indexes instead of dropping and recreating them. (Valid flag values arefalse
,no
,0
,true
,yes
or1
)
- --format <format>
If
--execute
is not given, this determines the output format: Plain SQL (formatsql
), or PySQL (formatpysql
) which can be piped intoll.pysql
.
- --thick <flag>
If true, use
oracledb
s thick mode. (Valid flag values arefalse
,no
,0
,true
,yes
or1
)
- --config_dir <directory>
In
oracledb
s thin mode, specify the directory that contains thetnsnames.ora
file. This can be used if “Connect Descriptor Strings” fromtnsnames.ora
must be used buttnsnames.ora
can’t be found in its default location.