The Database communication point in InputOutput or Out->In mode and database filters can connect to more than one database with each statement using one database connection. The main database must be uniquely identified using the driver, url, username and password tags and will be used as the default database for the statements. Additional databases can be configured using a database tag with embedded driver, URL, username and password tags.

In the event the database component has a connection failure to one of the databases, all the transactions will be rolled back.

As Rhapsody does not officially endorse the use of multiple database access, a warning is displayed for any connections you configure in addition to the first one.

Syntax

<database name="...">
    <driver>driver name</driver>
    <url>database url</url>
    <username>database username</username>
    <password>database password</password>
</database>

The name attribute must be provided so that a statement can refer to the named database. Each statement can use a secondary database connection if the database attribute points to a secondary database name. This attribute is optional. If the database attribute is omitted the main database connection is used for the statement. 

<statement name="main" database="...">
     ...
</statement>

Rhapsody variables are allowed for the values of the elements. For example:

<database name="...">
    <driver>driver name</driver>
    <url>database url</url>
    <username>${database_username}</username>
    <password>${database_password}</password>
</database>

The value of database_username variable and the value of database_password variable is used for the username and the password respectively when the database connection is made.