Environment Variables

It is recommended that the following environment variables are defined:


Eg, in the C-shell ([t]csh), one would type:

> setenv NOVADBNAME nova_prod
> setenv NOVADBPORT 5433
> setenv NOVADBUSER nova_reader
> setenv NOVADBPWDFILE [path/to/text/file]

The above values give read-only access to the production database.

In bash, instead one would type (for example):

> export

The $NOVADBPWDFILE variable is the location of password file for read-only access. PLEASE do not hardcode the actual password in any of your code! The contents of the file should be a single line with the password for the read-only account. If you do not know the password, please contact a dB expert. In order to enable read-only access, the following conditions must be met:

  • $NOVADBUSER = nova_reader
  • $NOVAPWDFILE is defined and the file exists with the correct password

Other useful, but perhaps not critical, environment variables are:

  • $NOVADBCACHEDIR: directory where failed SQL queries are cached in a simple text file. The name of the file is "NAME".cache, where "NAME" is the name of the dB table. SQL queries typically fail when there is no connection to the dB server.
  • $NOVADBNCNXTRIES: sets the number of tries allowed to connect to the dB. The default is 10. One can set this by either setting this env. variable, or setting it within the C++ code. Settings in code override environmental variable settings.
  • $NOVADBVERB: sets the verbosity level of the API. Currently any value greater than 0 will produce verbose output, useful for debugging.