On Tuesday 27 May 2008, Earnie Boyd wrote:
Quoting Larry Garfield larry@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. :-)