If you have elected to store multiple datastores 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) 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.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) 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.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> ...