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. The QDB service monitors this location for file additions and removals. When a file is added, QDB parses its contents and tries to load the database with the same name as the file. When a file is removed, QDB unloads the corresponding 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 access databases using different connections.

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

pps -m /temp

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

qdb -c /temp/qdb

The directory named in the PPS configuration path must exist before you start the QDB server. To start multiple instances of QDB, you must give each instance a distinct configuration path that's based on the PPS mountpoint. So in the above example, you could run an additional instance of QDB with the path /temp/customerdbs. In this case, we recommend you also give each instance a distinct QDB device mountpoint, by using the -n option. For details, see the QDB Command Line chapter.