A.7 Managing the Internal Database

Sentinel provides a db.sh script that allows you to manage the internal database. You can use this script if you need to start the database without starting Sentinel so you can perform maintenance tasks. You can also use this script to run SQL commands against the internal database.

The script db.sh is located in the /opt/novell/sentinel/bin directory. The script has commands and options. You must be logged in as the user that installed Sentinel for the script to work. The command must come first, followed by the option.

For example: ./db.sh status --log-file=sentinel_status.txt

This command writes the status of the internal database to the log file named sentinel_status.txt.

A.7.1 Commands

You can use the following commands with the db.sh script.

start: Starts the internal database without starting the Sentinel server.

stop: Stops the internal database.

force_stop: Forces the database to stop when the Sentinel service is still running.

status: Displays the status of the internal database.

sql <db name> <user name> <sql statement>: Allows you to send SQL commands to the internal database.

restart: Restarts the internal database.

force_restart: Forces the database to restart when the Sentinel service is still running.

try-restart: Tries to restart the internal database.

reload: Reloads the internal database.

force-reload: Forces a reload of the database.

A.7.2 Options

You can use the following options with the db.sh script. The options must start with a - or -- to be executed.

-w, --wait=<seconds>: Allows you to specify the amount of time to wait for the database to start or stop.

-h, --help: Displays help information for the script.

-l, --log-file=FILE: Logs messages to the specified file name.

--no banner: Suppresses banner messages.

-q, --quiet: Displays fewer messages.

-v, verbose: Displays more messages.