views:

50

answers:

1

Is it possible to access a Apache::DBI database handle from a perl script (that isn't running under mod_perl).

What I am looking for is database pooling for my perl scripts, I have a fair number of database sources (oracle/mysql) and a growing number of scripts.

Some ideas like SQLRelay, using Oracle10XE with database links and pooling, and or convert all scripts to SOAP calls, etc are becoming more and more viable. But if there was a mechanism for reusing Apache::DBI I could fight this a bit.

I have no non-perl requirements, so we don't have a php/jdbc implementation or similar to deal with.

Thanks

+2  A: 

First off it helps to remember that DBI/DBD is not a wire protocol, but an API over diverse data sources.

Since you are wanting to connect to a pool of database connections from separate processes, DBIx::Connector is not appropriate for that, and Rose::DB seems an odd choice too (they are both wrappers over DBI). You are looking for something like DBD::Proxy or DBD::Gofer, which let you connect multiple processes to a shared database handle.

MkV
Thanks, that's correct I need a proxy or connection pooling mechanism.Thank you.
hpavc