Managing Databases Through Configuration Files
You can use two environment variables to manage your template-based product's databases in the configuration file:
■DATABASE - Sets up databases.
■DEFAULT_WRITE_DB - Sets the default writable database.
You can place DATABASE entries in the private, site, or shared configuration files. The DEFAULT_WRITE_DB, however, is reserved for the private and site configuration files.
Note that you can also set up databases through menus, as explained in
Managing Databases. You may find it more convenient to use the menus.
Learn more about managing databases through configuration files:
Setting Up Databases
You can define databases in your template-based product using the keyword DATABASE. A DATABASE keyword entry has the following format:
DATABASE DB_NAME DB_PATH
In the format, DB_NAME is the name assigned to the database and DB_PATH is the location of the database in your file system. You can add any database to the DATABASE definition in any configuration file. If the database does not exist, your template-based product creates it in the specified location and adds it to the database list.
Specifying Default Writable Database
You can specify the database that you want to use as the database to which all files are written. You use the environment variable DEFAULT_WRITE_DB to define the default writable database. The DEFAULT_WRITE_DB environment variable has the following format:
DEFAULT_WRITE_DB DB_NAME
The environment variable defines the initial database that you want as the default location for writing files. Usually, you define the default writable database in your private configuration file, although you can set the writable database in any configuration file. You can change it during the session as explained in
Setting the Writable Database. Note that you will need permission to write to the file system location to which the DEFAULT_WRITE_DB points.