The dbctl utility allows access to a running eloqdb process.
It is used to control server operation or retrieve database
server status information. The list of available commands and
options depends on the version of the target database server.
dbctl implements an administrative communication channel with
the database server, submits the command and outputs the reply.
It does not implement the command functionality. Consequently,
the supported commands depend on the database server.
Please refer to the database server version specific
dbctl documentation for a list of supported commands.
An alternative to request status information is to use the
HTTP status of the eloqdb server process. After enabling the
"ServiceHttp" option in the eloqdb configuration file, a web
browser can be used to monitor the current status of the
dbctl [options] [command [arg ...]]
-help - show usage (this list)
-u name - user name
-p pswd - password
-h host - host name or address
-s service - service name or port number
-d flags - debug flags
-i - input mode (read commands from stdin)
-e - do not echo commands in input mode
help - show list of available commands
help command - show usage of specific command
exit - exit input mode
The options are:
- If the -i option is present, any dbctl commands are read from
stdin rather than the command line. This allows a single dbctl
invocation to to execute multiple server commands.
In this case the exit command (or an EOF condition) may be
used to exit from dbctl. A leading "#" or "!"
indicates a comment and the line is ignored.
Any commands read from stdin are echoed if stdin is not connected to
a tty device (script use). The option -e may be used to disable
the command echo.
When stdin is not connected to a tty device (batch use) dbctl will exit
if a command failure is encountered.
The dbctl option -e may be used to suppress the command echo when the
dbctl -i option is used. By default, any commands read from stdin are
echoed if stdin is not connected to a tty device (script use). The
option -e may be used to disable the command echo.
- -u login
- The login name to access the database. dbctl by default uses
the user id "public".
The default user name and password may be configured with the
EQ_DBUSER environment variable.
- -p pswd
- The password for the given database login.
The default password may be configured with the EQ_DBPASSWORD environment
- -h host
- Name or IP address of the system running the eloqdb server.
The default is the local system (localhost). The -h option also
accepts a host:service argument to specify a host name
The EQ_DBSERVER environment variable may be used to specify the
default database instance.
- -s service
- Service name or port number the eloqdb process is listening
on. The default is "eloqdb".
The example below demonstrates the dbctl -i mode in a script to obtain
slave server replication status repeatedly every 10 seconds:
while :; do echo replication monitor; sleep 10; done | ./dbctl -ie
The script will send the command "replication monitor" every 10
seconds to dbctl. dbctl submits the command to the server and
outputs the result.