[ Previous ] [ Contents ] [ Index ] [ Next ]

Internal Database Drivers

Configuration

Configuration for an internal database driver consists of setting parameters for the internal driver and creating a database pool that uses that driver.

The internal database driver parameters can be typed directly in the configuration file as described below. This example describes the steps involved in configuring an internal driver to interface with the Postgres or Solid driver.

Configure an Internal Database Driver
  1. Edit your AOLserver configuration file, usually named nsd.tcl.

  2. Add a configuration file section called ns/db/drivers:

        ns_section "ns/db/drivers"
    

  3. List the database drivers you will be using. For example:

        ns_section "ns/db/drivers"
        ns_param postgres nspostgres.so
        ns_param solid nssolid.so
    

  4. Add a configuration file section to list your database pools. For example:

        ns_section "ns/db/pools"
        ns_param mypool "This pool will use Solid"
    

  5. Add a configuration file section to define the database pool you have named. Seepage 75 for a complete list of database pool parameters. For example:

        ns_section "ns/db/pool/mypool"
        ns_param Driver solid
        ns_param Datasource "TCP/IP hostname 1313"
        ns_param Connection 1
    

  6. Choose which server or servers is to have access to the database pools you have defined. For each server, add a configuration file section to define which database pools it can access. For example:

        ns_section "ns/server/Server1/db"
        ns_params Pools *
    

    The "*" designation means that this server can access any of the defined database pools. See page 58 for a complete list of parameters for this section.

Solid Database

The SOLID database is a reasonably-priced database from Solid Information Technology that can be installed on many platforms. AOLserver provides an internal database driver for the SOLID database. Temporary evalation copies can be downloaded from their web site, http://www.solidtech.com. There are some special considerations with using the SOLID database that are addressed in this section.

This database driver is installed in the same way as other database drivers. Add nssolid.so as a database driver in the ns/db/drivers section of the configuration file. When you create a database pool for it, the correct format for the datasource is this:

    TCP/IP hostname 1313

TCP/IP specifies the protocol with which the SOLID AOLServer driver will communicate with the SOLID database server. The hostname is the fully-qualified hostname on which the SOLID database server resides, and 1313 is the port on that server where it is listening.

If you are using the nssolid database driver on Solaris 2.5.1, you need to set the LD_PRELOAD environment variable as follows:

    setenv LD_PRELOAD /usr/lib/libm.so.1

Note that the Solid database driver only works with nsdp under Irix.

Special thanks to Robert Locke for contributing the code for this module.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.