Configuring Berkeley DB with the Tuxedo System

Update the Resource Manager File in Tuxedo
Build the Transaction Manager Server
Update the UBBCONFIG File

To configure the Tuxedo system to use Berkeley DB resource managers, do the following:

Update the Resource Manager File in Tuxedo

For the purposes of this discussion, assume that the Tuxedo home directory is in

/home/tuxedo

In that case, the resource manager file will be located in

/home/tuxedo/udataobj/RM

Edit the resource manager file to identify the Berkeley DB resource manager, the name of the resource manager switch, and the name of the library for the resource manager.

For example, on a RedHat Linux Enterprise (64-bit) installation of Oracle Tuxedo 11gR1, you can update the resource manager file by adding the following line:

BERKELEY-DB:db_xa_switch:-L${DB_INSTALL}/lib -ldb 

where ${DB_INSTALL} is the directory into which you installed the Berkeley DB library.

Note that the load options may differ depending on the platform of your system.

Build the Transaction Manager Server

To do this, use the Tuxedo buildtms(1) utility. The buildtms command will create the Berkeley-DB resource manager in the directory from which it was run. The parameters to the buildtms command should be:

buildtms -v -o DBRM -r BERKELEY-DB

This will create an executable transaction manager server, DBRM, which is called by Tuxedo to process begins, commits, and aborts.

Update the UBBCONFIG File

You must make sure that your TUXCONFIG environment variable identifies an UBBCONFIG file that properly identifies your resource managers. In the GROUPS section of the UBBCONFIG file, you should identify the group's LMID and GRPNO, as well as the transaction manager server name "TMSNAME=DBRM." You must also specify the OPENINFO parameter, setting it equal to the string

rm_name:dir

where rm_name is the resource name specified in the RM file (that is, BERKELEY-DB) and dir is the directory for the Berkeley DB home environment (see DB_ENV->open() for a discussion of Berkeley DB environments).

Because Tuxedo resource manager startup accepts only a single string for configuration, any environment customization that might have been done via the config parameter to DB_ENV->open() must instead be done by placing a DB_CONFIG configuration file in the Berkeley DB environment directory. See File naming for further information.

Consider the following configuration. We have built a transaction manager server, as described previously. We want the Berkeley DB environment to be /home/dbhome, our database files to be maintained in /home/datafiles, our log files to be maintained in /home/log, and we want a duplexed server.

The GROUPS section of the ubb file might look like the following:

group_tm LMID=myname GRPNO=1 TMSNAME=DBRM TMSCOUNT=2 \
    OPENINFO="BERKELEY-DB:/home/dbhome"

There would be a DB_CONFIG configuration file in the directory /home/dbhome that contained the following two lines:

add_data_dir    /home/datafiles
set_lg_dir      /home/log

Finally, the UBBCONFIG file must be translated into a binary version using Tuxedo's tmloadcf (1) utility, and then the pathname of that binary file must be specified as your TUXCONFIG environment variable.

At this point, your system is properly initialized to use the Berkeley DB resource manager.

See DB class for further information on accessing data files using XA.