wacs.cfg: Database Environment Section

In order to correctly communicate with the database engine, whichever one that may be, a number of parameters have to be provided to the underlying mechanism. These include the database account name to use, the password associated with that account, the network location of the database server and any additional support environment variables that are needed to make it work. Normally those free databases (such as MySQL) that are shipped with the operating system itself are pre-configured to know the location of all their component parts. For commercial packages like ORACLE, this is not so clear cut as on different distributions, the Oracle applications and libraries might be in /usr/local/oracle, or /opt/oracle or any number of installation-specific locations. In these cases the database routines include an environment variable, in the case of Oracle called simply ORACLE_HOME, to locate where the necessary components are within the filesystem. WACS includes the ability to establish any one aribitary environment variable with a suitable value before the database routines are invoked.

The table below details the configuration elements provided by the WACS configuration system and how to use them:

Table 5.1. Configuration: Database Section

VariableDescriptionTypical Value
dbienvvar

Commerical databases such as Oracle 10g usually require the presence of an environment variable to tell their libraries where to find configuration information, libraries, etc. This is the name of that variable; the companion attribute, dbienvvalue, is what value that variable should have.

ORACLE_HOME
dbienvvalue

The value that dbienvvar should be set to; typically the location of the installed database library and configuration files for the database.

/usr/local/oracle/V10.1.0
dbiconnect

This is the connect string that needs to be passed to the perl DBI routines to specify the database type and instance to be connected to. For Oracle it'll be something like dbi:Oracle:orasrv where orasrv is the SID of the database. For MySQL it'll be something like dbi:mysql:wacs:myserver where wacs is the database name and myserver is the name of you database host.

dbi:Oracle:orasrv
phpdbconnect

This is the connect string that needs to be passed to the PHP DB routines (php5) to specify the database type and instance to be connected to. For Oracle it'll be something like oci8://wacs:wacs@orahost/orasrv1 where orahost is the host name of the Oracle server and orasrv1 is it's instance name. For MySQL it'll be something like mysql://wacs:wacs@mysqlhost/wacs where the first wacs is the username, the second the password, then the at symbol followed by the hostname the database runs on and the finally the database name.

mysql://wacs:wacs@mysqlhost/wacs
dateformat

This is the format of date used by the underlying database - initially this will be either DD-MON-YYYY (the Oracle format) or YYYY-MM-DD (the MySQL format).

YYYY-MM-DD
dbuser

The username to log into the database with.

wacs
dbpass

The password to use in conjuction with the account name given in given in dbuser above to log into the database with.

wacs