If you wish to connect to an iSeries Server, such as an AS/400, there are two options. Installing DB2 Express-C v9.5 and purchasing DB2 Connect Personal Edition for about $500 or getting System I Access for Linux, which is a free download. Please note the server requirements for each of these. For example, we originally went with DB2 Express-C and decided upon Ubuntu 7.10, but learned about System I Access, from an IBM rep, which requires redhat package manager, after the entire server was up and running.
DB2 Express-C
http://www-306.ibm.com/software/data/db2/express/
DB2 Connect Personal
http://www-306.ibm.com/software/data/db2/db2connect/edition-pe.html
System I Access for Linux
http://www-03.ibm.com/systems/i/software/access/index.html
NOTE: System I Access requires redhat package manager.
IBM DB2, Cloudscape and Apache Derby Functions
Table of Contents
- db2_autocommit — Returns or sets the AUTOCOMMIT state for a database connection
- db2_bind_param — Binds a PHP variable to an SQL statement parameter
- db2_client_info — Returns an object with properties that describe the DB2 database client
- db2_close — Closes a database connection
- db2_column_privileges — Returns a result set listing the columns and associated privileges for a table
- db2_columns — Returns a result set listing the columns and associated metadata for a table
- db2_commit — Commits a transaction
- db2_conn_error — Returns a string containing the SQLSTATE returned by the last connection attempt
- db2_conn_errormsg — Returns the last connection error message and SQLCODE value
- db2_connect — Returns a connection to a database
- db2_cursor_type — Returns the cursor type used by a statement resource
- db2_escape_string — Used to escape certain characters.
- db2_exec — Executes an SQL statement directly
- db2_execute — Executes a prepared SQL statement
- db2_fetch_array — Returns an array, indexed by column position, representing a row in a result set
- db2_fetch_assoc — Returns an array, indexed by column name, representing a row in a result set
- db2_fetch_both — Returns an array, indexed by both column name and position, representing a row in a result set
- db2_fetch_object — Returns an object with properties representing columns in the fetched row
- db2_fetch_row — Sets the result set pointer to the next row or requested row
- db2_field_display_size — Returns the maximum number of bytes required to display a column
- db2_field_name — Returns the name of the column in the result set
- db2_field_num — Returns the position of the named column in a result set
- db2_field_precision — Returns the precision of the indicated column in a result set
- db2_field_scale — Returns the scale of the indicated column in a result set
- db2_field_type — Returns the data type of the indicated column in a result set
- db2_field_width — Returns the width of the current value of the indicated column in a result set
- db2_foreign_keys — Returns a result set listing the foreign keys for a table
- db2_free_result — Frees resources associated with a result set
- db2_free_stmt — Frees resources associated with the indicated statement resource
- db2_get_option — Retrieves an option value for a statement resource or a connection resource
- db2_lob_read — Gets a user defined size of LOB files with each invocation
- db2_next_result — Requests the next result set from a stored procedure
- db2_num_fields — Returns the number of fields contained in a result set
- db2_num_rows — Returns the number of rows affected by an SQL statement
- db2_pconnect — Returns a persistent connection to a database
- db2_prepare — Prepares an SQL statement to be executed
- db2_primary_keys — Returns a result set listing primary keys for a table
- db2_procedure_columns — Returns a result set listing stored procedure parameters
- db2_procedures — Returns a result set listing the stored procedures registered in a database
- db2_result — Returns a single column from a row in the result set
- db2_rollback — Rolls back a transaction
- db2_server_info — Returns an object with properties that describe the DB2 database server
- db2_set_option — Set options for connection or statement resources
- db2_special_columns — Returns a result set listing the unique row identifier columns for a table
- db2_statistics — Returns a result set listing the index and statistics for a table
- db2_stmt_error — Returns a string containing the SQLSTATE returned by an SQL statement
- db2_stmt_errormsg — Returns a string containing the last SQL statement error message
- db2_table_privileges — Returns a result set listing the tables and associated privileges in a database
- db2_tables — Returns a result set listing the tables and associated metadata in a database
ibm_db2
kfoubert at sitecrafting dot com
29-Apr-2008 02:00
29-Apr-2008 02:00
grahamcbell at homecall dot co dot uk
13-Mar-2008 12:52
13-Mar-2008 12:52
We can connect to the Iseries with Client Access ODBC driver but not IBM DB2 ODBC Driver. It would be helpful if you could provide the path/link to the IBM site that you found.
pbielen at gmail dot com
13-Dec-2007 07:04
13-Dec-2007 07:04
Ok, i found the solution.
If you just want to connect to the iSeries DB/2 database you only have to install the IBM DB/2 runtime client, that's all what is needed. Google for that software and download it from the ibm site.
After the install your extentions (php_ibm_db2.dll and/or php_pdo_ibm.dll will load succesfully on windows.
Hope this helps anybody that was just like me looking for a solution for months now.
pbielen at gmail dot com
12-Dec-2007 08:49
12-Dec-2007 08:49
This is so frustrating.
To be able to connect to DB/2 you have to install a bunch of software, why is there not just a odbc-driver or something ?
To connect to iSeries it seems you also have to download DB/2 connect to be able to do that, well is it that hard to paste the links into this forum also, so you won't have to look for hours to find this piece of software ? Then if you install the DB/2 client as the document here says, then it installs al complete DB/2 database on the pc where you want to run PHP to connect to iSeries DB/2. Well i don't need all that software, i just want to connect to the iseries DB/2 database.
Why must IBM always make it so hard to get something done. How about a clear HOW-TO that gives you each single step and each single command you have to use ? I'm now already trying for 3 months to get that crap running, but still no success. Then i saw a new zend release which requires i5 OS V5R4 but we only have V5R3 here.
Then when you install xampp on a windows box which has php 5.2 and mysql 5 then there is indeed a php_ibm_db2 extension, but no matter if you comment it out, it simply does not load. So i guess we need to install that bunch of software to get something so easy (just a connection to a database) running. It's really frustrating anyway that only OpenSource Driven companies, Like PHP and MySQL are able to provide us with tools that just work out of the box (mysql extention anyone ?).
I always thought it was only MS that was a big pain in da *** but seems IBM also knows how to frustrate users.
