Qorus Integration Engine  3.0.4.p7
schema-tool: Schema Manipulation Helper Tool

Usage
schema-tool [options]

This program assists with schema manipulation, particularly with tasks regarding installing or upgrading the system schema. With no command-line options, the program returns the status of the system schema (according to the configuration found in the Qorus installation pointed to by the $OMQ_DIR environment variable).

Be aware that this program is delivered as a Qore-language script, and, as such, requires either the $OMQ_DIR or $QORE_MODULE_DIR environment variables to be set to find the Qorus client module, if not located in the default location.

schema-tool supports options for some common database maintenance tasks, as well as takes responsibility for loading all SQL scripts into Qorus datasources. See the options below for more information.

Miscellaneous Options Supported by schema-tool

Long Option Short Description
–code -c Display a numeric code instead of the schema version string
–type -t Display only the database driver for the system schema
–verbose -v Show more information when displaying the schema version; additionally displays the archive schema status (if any)
–arch[=ARC] -a Perform the operation on the archive schema; the argument is required with -C
–datasource=ARG -D Overrides datasource parameters, ARG: dsname=spec, spec=driver:user/pass@dbname[hostname][:port]
–current Shows the current system (target) schema version
–dry-run -d do not send any SQL to the database, just prints out commands; affects only 'write' statements
–migrate -M migrate old users in options file to RBAC DB
–help -h Display this help text

Schema Maintenance Options Supported by schema-tool

–analyze[=ARG] -A Analyze Oracle index health in the given datasource (system schema if no datasource argument is given); verbose info with -v, see also –max-height and –max-leaf-pct
–block-buffer[=ARG] -b Show the Oracle block buffer hit ratio for the given datasource (system schema if no datasource argument is given)
–force-rebuild[=ARG] -F Force rebuilding all indexes in the given datasource (system schema if no datasource argument is given)
–ignore-errors -i ignore errors when loading schema files
–max-height=ARG Sets the maximum index height threshold for rebuilding Oracle indexes
–max-leaf-pct=ARG Sets the threshold for the maximum percentage of deleted leaf nodes for rebuilding Oracle indexes
–parallel -P use "parallel" when rebuilding indexes on Oracle
–rebuild[=ARG] -R Analyze Oracle index health in the given datasource (system schema if no datasource argument is given) and rebuild indexes that exceed the height and deleted leaf node parameters; verbose info with -v, see also –max-height and –max-leaf-pct to set parameters
–schema-stats[=ARG] -S Analyze statistics for all tables in the given datasource (system schema if no datasource argument is given)
–snapshot -s refresh the workflow instances/statuses snapshot; it should be used periodically if the Qorus option info-snapshot is set
–table-stats=ARG -T Analyze statistics the given table, a datasource may be given if ARG=datasource_name=table_name, otherwise the system schema is assumed if no datasource name is supplied in the argument

Schema Modification Options Supported by schema-tool

–align-schema -V Align the system datasource with the system schema description
–data-ts=ARG Sets the data tablespace name for the given datasource, ARG syntax: datasource_name=tablespace_name
–drop-schema=[ARG] drop system schema; optional ARG=user schema module for user schema
–force -f force schema verification and alignment (also allows schema downgrades)
–ignore-errors -i ignore errors when loading schema files
–index-ts=ARG Sets the index tablespace name for the given datasource, ARG syntax: datasource_name=tablespace_name
–new-release run release load file for new releases
–run-schema=ARG -r executes the given schema file in the given datasource, with an optional starting line number for use when recovering after an error: ARG=dsname=filename[:starting-line]