[support] Seeking Advice on Integrating drupal

Larry Garfield larry at garfieldtech.com
Wed May 28 03:16:12 UTC 2008


On Tuesday 27 May 2008, Earnie Boyd wrote:
> Quoting Larry Garfield <larry at garfieldtech.com>:
> > Drupal currently cannot connect to more than one database type at a
> > time;  All
> > databases must be either MySQL or PostgreSQL.  While one could write an
> > MS SQL driver for Drupal's current database implementation, there's no
> > guarantee that it would work with the vast array of contrib modules out
> > there; in fact, odds are against you.  MS SQL, because AFAIK it doesn't
> > require any additional field handling, is one of the few that are even
> > possible to think about.  You would have to move the entire Drupal system
> > over to MS SQL, though.
>
> Well I suppose that the fact that I connect to multiple databases using
> Drupal makes your point somewhat mute but both databases were MySql
> though I see no reason why one couldn't be a different DB engine.  You
> use an array of databases in the settings.php file to give the
> connections and you use db_set_active[1] before performing the queries
> to the second DB and then after to reset back to the default.  There is
> nothing suggesting to me that the database connections must be the same.

Drupal loads either the database.mysql.inc file or the database.pgsql.inc 
file.  Both files define the same function names.  If you try to load both, 
you get a duplicate function name fatal error and your PHP process dies 
immediately.

Two, three, or eight MySQL databases, no problem.  4 different PostgreSQL 
databases, great.  One of each?  Drupal will cry. :-)

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the support mailing list