You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Batara Kesuma <bk...@ml.gaijinweb.com> on 2004/07/23 11:27:54 UTC
Persistent DB connection problem
Hi,
I do queries from several DB servers. I use Apache::DBI to initiate
persistent connection:
## startup.pl
use Apache::DBI ();
use DBI ();
The problem is, Apache::DBI will make persistent connection to all DB
servers, but since some servers are not used so frequently as the
others, I don't want to make a persistent connection to these servers.
Can I use Apache::DBI to initiate persistent DB connection only for some
DB handler? Thanks in advance.
Regards,
Batara
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Persistent DB connection problem
Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2004-07-23 at 05:27, Batara Kesuma wrote:
> Can I use Apache::DBI to initiate persistent DB connection only for some
> DB handler?
Sure, just use the dbi_connect_method option on the ones you want to
make non-persistent:
my $dbh = DBI->connect('dbi:...',... ,{'dbi_connect_method' =>
'connect'});
- Perrin
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html