Forum OpenACS Q&A: Multiple Data Source OpenACS installation
Hi there,
Can someone help me out? I'm trying to configure an extra Oracle pool in my Postgres OpenACS startup file. I'm getting the following error: 'Database pool "my_pool" is of type "oracle". The first database pool available to OpenACS was of type "postgresql". All database pools must be configured to use the same RDMBS engine, user and database.'
Is is possible to have access to both a postgres and oracle datasource from aolserver or am I just being really stupid? I've included my db configuration below...thanks for your help.
ns_section "ns/db/drivers"
if { $database == "oracle" } {
ns_param ora8 ${bindir}/ora8.so
} else {
ns_param ora8 ${bindir}/ora8.so
ns_param postgres ${bindir}/postgres.so ;# Load PostgreSQL driver
}
ns_section ns/db/pools
ns_param my_pool my_pool
ns_param pool1 "Pool 1"
ns_param pool2 "Pool 2"
ns_param pool3 "Pool 3"
ns_section ns/db/pool/pool1
ns_param maxidle 1000000000
ns_param maxopen 1000000000
ns_param connections 5
ns_param verbose $debug
ns_param extendedtableinfo true
ns_param logsqlerrors $debug
if { $database == "oracle" } {
ns_param driver ora8
ns_param datasource {}
ns_param user $db_name
ns_param password $db_password
} else {
ns_param driver postgres
ns_param datasource localhost::${db_name}
ns_param user nsadmin
ns_param password ""
}
ns_section ns/db/pool/pool2
ns_param maxidle 1000000000
ns_param maxopen 1000000000
ns_param connections 5
ns_param verbose $debug
ns_param extendedtableinfo true
ns_param logsqlerrors $debug
if { $database == "oracle" } {
ns_param driver ora8
ns_param datasource {}
ns_param user $db_name
ns_param password $db_password
} else {
ns_param driver postgres
ns_param datasource localhost::${db_name}
ns_param user nsadmin
ns_param password ""
}
ns_section ns/db/pool/pool3
ns_param maxidle 1000000000
ns_param maxopen 1000000000
ns_param connections 5
ns_param verbose $debug
ns_param extendedtableinfo true
ns_param logsqlerrors $debug
if { $database == "oracle" } {
ns_param driver ora8
ns_param datasource {}
ns_param user $db_name
ns_param password $db_password
} else {
ns_param driver postgres
ns_param datasource localhost::${db_name}
ns_param user nsadmin
ns_param password ""
}
ns_section ns/db/pool/my_pool
ns_param MaxIdle 1000000000
ns_param MaxOpen 1000000000
ns_param Driver ora8
ns_param Connections 4
ns_param DataSource {Athlon_SID}
ns_param User wibble
ns_param Password wibble
ns_param Verbose On
ns_param ExtendedTableInfo On
ns_section ns/server/${server}/db
ns_param pools "*"
ns_param defaultpool pool1