Forum OpenACS Development: Re: Re: Connecting with SQLServer

Posted by Steve Manning on
We do a similar thing getting data from a different PG database. I was interested in your Openacs config because we have it slightly differently.

Firstly we specify a database section after the drivers:

    ns_section ns/server/${server}/acs/database
    ns_param database_names  [list oacs shop]
    ns_param pools_oacs      [list pool1 pool2 pool3]
    ns_param pools_shop      [list pool4]

Then we use the specified database_names as the parameter for the -dbn switch:

    db_0or1row -dbn shop some_sql {select something from somewhere}

This method also means you can easily add more pools to your second database.

- Steve