Hi,
I am a developer working on a drupal db2 database abstraction module for a client. My development database server is the free DB2 Universal Database from IBM, running on a windows, however my client has a Z series IBM server. I am using the PHP ibm_db2 API which accesses the database via a db2cli.dll library. After adding hacking in support for multiple active databases to drupal 4.7 I created a working database.db2.inc abstraction module.
Initially I found it sufficient for accessing some ancillary data by switching from the drupal running on a mysql server to some tables in the db2 database via db_set_active(). However i decided to go further by porting the mysql drupal db creation schema files of drupal 4.7 as best of possible to db2 sql syntax using a reference manual. Well to make a long story short, after much debugging with db2cli traces, and a fair amount of hacking of some of the drupal modules I finally have drupal running from db2. The drupal source code hacks though very unfortunate and a reluctant act on my part were absolutely necessary in my opinion due mostly to the loose type casting used in Drupal which has is no problem for mysql. However since db2 has very strict casting and data types some changes had to be made. Never-the-less I made every effort to ensure my modifications were backwards compatible with atleast the mysql database.
Right now i'm still running tests for more bugs but i am very confident that i can have this working 100%. So if there is anyone interested in the work I have done please let me know, since I would be more than happy to share some patches. Drupal is great software and I would love to recontribute.
Regards
Kris Dover
Network Engineer/Website Developer
Comments
How about posting
this info here:
http://groups.drupal.org/enterprise - there are people there who have been working on Oracle and MSSQL support.
and also in the devel mailing list - I'm sure you'll get more attention from those that count than a forum post. Forum posts tend to get a little lost.
I'm not a DB2 user, but the Drupal project is keen to support other DBs provided someone is prepared to maintain the support for that DB (there are one or more people looking after PostgreSQL compatibility for instance). There was recent discussion on the devel mailing list about a future abstraction layer for the schema management side (but not the basic querying/ updating side) of Drupal to make it easier to support DB portability. It might be a good time to add to that discussion.
Anyway - nice work :)
--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
--
Anton
Thanks for the referral
Hi,
thanx alot for replying. I followed the url to the enterprise discussion group and I will repost my forum topic there and see who might be interested. A schema abstraction layer does indeed sound like a nice idea; would sure make exporting the drupal db structure to misc. DBs less tedious. Will give it a look.
Regards,
Kris
Kris
Likely no hacks required
There is much talk on the dev list about further database support. It is likely no hacks are required: you just need definition files and special rules for DB2, in the same way that support for PostgreSQL is written.
By all means, make the code available.
Just tell me how!
Hi,
I'm new to the whole drupal development arena. Indeed if there is a way to make this thing work without modifying the drupal core i'd love to know it. I will figure out how to post what I have so far and maybe someone can better advise me.
Thanx
Kris
Kris
Apperantly what Drupal does
Apperantly what Drupal does is have diferente database.xxx.inc in the /includes directory. These files define all the primitives used to get data in and out of the database. Having work with DB2 (professionally) I believe Postgres is closer to DB2 than mysql. Now my take on this would be:
This should do the trick.