If you have elected to store multiple datastores, region databases, and a cross-region database in a single physical database, you can configure these resources to share one database connection, which can significantly reduce the load on database server side resources, such as session management and memory usage. You can take advantage of this with both the ODBC data source and the connection string methods.
For ODBC connections:
dbfhconfig -update -server:ONEDB_SS -dsn:SS.ONEDS -odbcdsn:ONEDB_SS
The following example shows an excerpt from an MSSQL database configuration file where two datastores (SS.DATASTORE1 and SS.DATASTORE2), a region database (SS.REGION), and a cross-region (SS.CROSSREGION) all use one database connection (the ONEDB_SS data source).
...
<server name="SERVER_SS" type="sqlserver" access="odbc">
<dsn name="SS.MASTER" type="database" dbname="master"/>
<dsn name="SS.CROSSREGION" type="crossregion.cas" dbname="onedb_ss" odbcdsn="ONEDB_SS" />
<dsn name="SS.REGION" type="region.cas" region="MYREGION" dbname="onedb_ss" odbcdsn="ONEDB_SS" /><dsn name="SS.DATASTORE1" type="datastore" dsname="MYFILES1" dbname="onedb_ss" odbcdsn="ONEDB_SS" />
<dsn name="SS.DATASTORE2" type="datastore" dsname="MYFILES2" dbname="onedb_ss" odbcdsn="ONEDB_SS" />
</server>
...
For connection string connections:
dbfhconfig -update -server:ONEDB_SS -dsn:SS.ONEDS -connect:"Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=onedb_pg;Uid=myuser;Pwd=mypass;"
The following example shows an excerpt from a PostgreSQL database configuration file where the datastores (PG.DATASTORE1 and PG.DATASTORE2), a region database (PG.REGION), and a cross-region (PG.CROSSREGION) all use one database connection, as evidenced by the same connection string for each entry.
...
<server name="SERVER_PG" type="postgresql" access="odbc">
<dsn name="PG.POSTGRES" type="database" dbname="postgres" connect="Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=postgres;Uid=myuser;Pwd=mypass;" />
<dsn name="PG.CROSSREGION" type="crossregion.cas" dbname="onedb_pg" connect="Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=onedb_pg;Uid=myuser;Pwd=mypass;" />
<dsn name="PG.REGION" type="region.cas" region="MYREGION" dbname="onedb_pg" connect="Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=onedb_pg;Uid=myuser;Pwd=mypass;" /><dsn name="PG.DATASTORE1" type="datastore" dsname="MYFILES1" dbname="onedb_pg" connect="Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=onedb_pg;Uid=myuser;Pwd=mypass;" />
<dsn name="PG.DATASTORE2" type="datastore" dsname="MYFILES2" dbname="onedb_pg" connect="Driver={PostgreSQL ANSI};Server=localhost;Port=5432;Database=onedb_pg;Uid=myuser;Pwd=mypass;" />
</server>
...