PPS configuration path

QDB requires a dedicated location for storing the database configuration and status objects. This location is called the PPS configuration path. The database configuration objects are text files that control database setup. The status objects are text files that report the database states.

The config subdirectory

The contents of the config subdirectory under the PPS configuration path determine which databases are currently visible to QDB. QDB monitors this location for file additions and removals. When a file is added to config, QDB parses the file's contents and tries to load the database with the same name as the file. When a file is removed from the subdirectory, QDB unloads the database, meaning it removes the database from visibility but doesn't delete it.

The status subdirectory

The files in the status subdirectory report the states of databases that QDB attempted to load. Each status file contains a Status attribute, whose value can be one of:
Initializing
The database configuration object has been seen and the database is initializing.
Error
There was an error with the configuration of the database.
Valid
The database has been configured and can be accessed.
AttachWait
The database is waiting for an auto-attached database to become available before configuration can continue.

Overriding the PPS configuration path

The default PPS configuration path for QDB is /pps/qnx/qdb. You can override this default path to run multiple instances of QDB. This is useful if you want to run databases with different connection settings.

The PPS configuration path is based on the PPS mountpoint. Before starting QDB, you can start PPS with either the default mountpoint (/pps) by using no command-line options, or with an overriden mountpoint by using the -m option, as in the following example:

pps -m /temp

You can then override the PPS configuration path by running the qdb utility with the -c option, as follows:

qdb -c /temp/qdb

The directory named in the PPS configuration path must exist before you start QDB. You can launch multiple instances of QDB with different configuration paths so long as each path is based on the PPS mountpoint. So in the above example, you could also run an instance of QDB with the PPS configuration path /temp/customerdbs.

We recommend you use separate QDB device mountpoints for separate QDB instances; this is done with the -n option on the qdb command line. For details, see the QDB Command Line chapter.