Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 3935 invoked from network); 10 Jul 2008 01:35:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2008 01:35:59 -0000 Received: (qmail 9684 invoked by uid 500); 10 Jul 2008 01:35:49 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 9662 invoked by uid 500); 10 Jul 2008 01:35:49 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 9431 invoked by uid 99); 10 Jul 2008 01:35:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 18:35:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=FM_FAKE_HELO_VERIZON,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of donovant@bellatlantic.net designates 206.46.173.3 as permitted sender) Received: from [206.46.173.3] (HELO vms173003pub.verizon.net) (206.46.173.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 01:34:54 +0000 Received: from [192.168.11.2] ([70.22.224.90]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K3R00K6MODUNFC8@vms173003.mailsrvcs.net> for modules-dev@httpd.apache.org; Wed, 09 Jul 2008 20:34:42 -0500 (CDT) Date: Wed, 09 Jul 2008 21:34:41 -0400 From: Tom Donovan Subject: Re: mod_dbd and more than one database server In-reply-to: To: modules-dev@httpd.apache.org Reply-to: Tom.Donovan@acm.org Message-id: <48756731.8020503@bellatlantic.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-Virus-Checked: Checked by ClamAV on apache.org Kevac Marko wrote: > Hello. > > Is there any way in mod_dbd to connect to more than one database server? > Yes - but only for different virtual hosts. You can put different mod_dbd directives within different sections. You can even use different DBDriver and DBDParams if you have completely different databases, e.g. MySQL and SQLite. mod_dbd only provides connections from one set of mod_dbd directives per virtual host, so you can't access more than one database from the same virtual host. If you are writing your own module, you could always open ad-hoc database connections directly using the apr-util functions apr_dbd_get_driver(), apr_dbd_open_ex(), apr_dbd_close(), etc. instead of using the pool of connections provided by mod_dbd. -tom-