-
Notifications
You must be signed in to change notification settings - Fork 0
DB2 Database Driver
I've created some IBM DB2 drivers for CodeIgniter 1.5.4 (I'm sure you can adapt them to earlier versions too), and figured I'd let others who were searching for the same thing have access to them. I've got two different versions, one is a driver for cataloged databases on your local host, and the other is for uncataloged remote database connections. These two versions are almost identical except for the the method they use to connect. There are a few things that are required for these drivers to work successfully.
-
You must have the ibm_db2 PECL extension installed, otherwise, none of the functions will be recognized.
-
You must have a DB2 database or client utility installed on your local machine for the ibm_db2 PECL extension to work properly.
When those are up and running, feel free to use the DB2 drivers provided below. If you wish to improve, or make changes please let me know. Just find my CI profile, and email me.
These are functional, but not quite complete. You can run queries, and do what you need to do, but some of the more obscure methods haven't been coded to work with db2 yet. They will be completed over the next 24-48 hours, and then this message will be removed. Posted: 01/24/2008
DB2 Uncataloged or Remote Connections Download: File:db2u.zip
Take the zip file, extract the contents of it to your system/database/drivers folder of your CodeIgniter installation. Make sure the following 5 elements are defined properly in your database config file. All 5 elements are required to successfully connect, and use, especially the database name element.
$db['default']['hostname'] = "HOSTNAME"; $db['default']['username'] = "username"; $db['default']['password'] = "password"; $db['default']['database'] = "DBNAME"; $db['default']['dbdriver'] = "db2u";
DB2 Cataloged Connections Download: db2c.zip
Take the zip file, extract the contents of it to your system/database/drivers folder of your CodeIgniter installation. Make sure the following 5 elements are defined properly in your database config file. All 5 elements are required to successfully connect, and use, especially the database name element.
$db['default']['hostname'] = "HOSTNAME"; $db['default']['username'] = "username"; $db['default']['password'] = "password"; $db['default']['database'] = "DBNAME"; $db['default']['dbdriver'] = "db2c";
Download File:db2u.zip (DB2 Uncataloged or Remote Driver)