Forum OpenACS Q&A: coneection to multiple server

For coneection to multiple server ,, is it neccessary that all database server that we defined in openacs.tcl file  need to have openacs installation ...
it means table related to openACS installation...
Posted by Patrick Giagnocavo on
Hi Dipali,

No, it is not necessary that each database server you are connecting to have an openacs installation.

However, the three main pools should all be the same database and have the openacs tables installed.  These pools are named main, log, and subquery.

You can create any number of database pools; so you could create another pool called remote1 for instance, and just run queries against that.  Note, however, you would need to specifically use that pool (and thus that database) in your tcl code.

Posted by Andrew Piskorski on
Note that last I checked, the default OpenACS AOLserver config.tcl file did not contain the syntax to tell the OpenACS db api which pools are for the OpenACS database - so by default it assumes they all are. (Hm, guess I should add that prior to the 5.0 beta...)

But in the meantime, if you add non-OpenACS database pools to your AOLserver, it is easy to add the necessary lines to the config file, but you'll need to refer to the docs and/or the comments in the code to tell you how.

Also, note that in OpenACS 4.6.x, you can only tell the OpenACS db api, "Don't use these other pools at all, they're for a different database." There, you can access the non-default database only via the ns_db API. The Head on the other hand (what will become OpenACS 5.0), has multi-db support, so there you can use the OpenACS db API to access as many different databases as you want, via the -dbn switch to the db API functions.

Posted by Andrew Piskorski on
FYI, the multi-db config syntax I mentioned above is now in the OpenACS etc/config.tcl file on the Head, so it will be part of OpenACS 5.0.