The dbutil utility may be used to perform security and structural database
changes by uploading a new schema for the database to the server. The database
server then executes structural changes as required.
The dbutil program may be started in two different modes: interactive or batch.
The dbutil program runs in interactive mode when no script file is
specified on the command line. The interactive dialog user interface
provides a subset of the scripting capabilities which are
typically used to maintain a database. Currently this is mostly
limited to managing database security.
Pressing the F1 key (or selecting the Help function) provides
on-line help.
Please refer to the
dbutil interactive usage
description for more information.
The dbutil program will run in batch mode when a script file is specified
on the command line. The statements in the script file allow a variety
of database operations, ranging from database security management to
database structural maintenance. Please refer to the
dbutil syntax description
for more information.
usage: dbutil [options] [file|-]
options:
-help - show usage (this list)
-u name - user name (default "dba")
-p pswd - password
-h host - host name or ip address (and service)
-s service - service name or port number
-n - pretend (batch mode only)
-v - verbose (batch mode only)
-e cnt - abort processing after encountering cnt errors
-d flgs - debug flags
-T - TurboIMAGE compatibility mode
If a file is specified, dbutil runs in batch mode and processes any
statements in the input file. If the file argument is not specified,
dbutil runs in interactive mode.
(specifying a hyphen instead of a file name reads script commands from stdin)
The options are:
- -help
- The -help option displays a brief help text.
- -u user
- The -u option specifies the database user (or a file
holding the database user and/or password).
Defaults to the dba user unless a default user is
specified with the EQ_DBUSER
environment variable.
- -p password
- The -p option may be used to specify the password
for the database user (or a file holding the password).
If not specified, the password is obtained using the
EQ_DBUSER
and/or EQ_DBPASSWORD
environment variables.
- -h host[:service]
- The -h option may be used to specify the database server host
name (or IP address) and service name (or TCP port number).
Defaults to localhost:eloqdb unless a default instance is specified
with the EQ_DBSERVER environment
variable.
- -s service
- The -s option may be used to specify the service name or TCP port
number of the database server.
Defaults to eloqdb unless a default instance is specified
with the EQ_DBSERVER environment
variable.
- -n
- The -n option instructs dbutil to only check the syntax and validity of
a given dbutil script, without actually performing any database changes.
- -v cnt
- The -v option enables more detailed progress messages during script processing.
If specified twice, every command in the script will be echoed back to the user.
- -e cnt
- The -e option sets the number of errors allowed before script processing aborts.
- -d flags
- The -d option specifies debug flags and is normally not used.
- -T cnt
- The -T option enables TurboIMAGE compatibility mode for script processing.
This mode is useful for databases migrated from HP 3000 systems to Eloquence
and alters the rules for available item types and item size units.
Make sure you have a valid backup before performing database changes!
The example below invokes dbutil in interactive (dialog) mode:
(on HP-UX you may benefit from using TERM=70092 for dbutil interactive mode)
$ dbutil
The example below invokes dbutil in batch mode, checking first, executing next:
$ cat my-script
database "toydb";
change item customer-name type X40;
exit;
$ dbutil -n my-script
*** Test mode is active, discarding all changes
$ dbutil -v my-script
Processing script ...
Checking database consistency ...
Consistency check completed successfully
Database restructure analysis:
CUSTOMERS
* Record reorganized due to item definition change
Data restructure process required.
Uploading modified schema ...
Restructuring database ...
done
DBUTIL Script Syntax
description in the Eloquence B.08.40 documentation.
DBUTIL Interactive Usage
description in the Eloquence B.08.40 documentation.
Lab 2.5
on "database structure changes" in Eloquence Workshop
student guide.
Lab 2.6
on "database security changes" in Eloquence Workshop
student guide.
|