Instructions for building and installing the IBM_DB driver from source

Building the driver manually as described below is not required if the
install process above has been pursued. This manual procedure is in fact
automated on Linux and UNIX platforms by the IBM_DB gem install, but is
presented here only for reference.

1) a) Copy the files under test directory of ibm_db gem to the test
directory of Activerecord following the same directory structure. These
files contain modifications in some test files of AR suite to handle ibm_db
specifics. Hence make sure these files are replaced in the AR test suite
properly.

- ActiveRecord remove_column method is not supported for DB2 zOS
- The driver returns an error when you try to insert a TIMESTAMP value into a DATE column.
To fix this, please ensure that the following configuration keyword PATCH2=58 is set
in the COMMON section of your DB2 CLI initialization file (db2cli.ini):
- set: db2 UPDATE CLI CFG FOR SECTION COMMON USING PATCH2 58
- verify: db2 GET CLI CFG FOR SECTION COMMON
Please refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.cli.doc/doc/c0007882.htm
for more information.
- The behaviour of ActiveRecord::Base.find(:first) without an :order attribute can be unpredictable.
The first record (i.e. the record with the minimum id) may be not retrieved. In a relational model,
the order of the rows returned is unpredictable and independent of the order of insertion.
This issue may be addressed in a future release.
- Rails applications on DB2 9 require the APPLHEAPSZ database configuration parameter to be
set to or above 1024. You will need to set this parameter for each database for which you will be
running DB2 on Rails applications. Following is the command syntax for updating the
applheapsz parameter:
> db2 update db cfg for <database_name> using APPLHEAPSZ 1024
To enable this parameter, you need to restart your DB2 instance.
- If you see connectivity issues with Informix Dynamic Server, please ensure that the server is configured to accept DRDA connections.
Please refer to http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.admin.doc/admin154.htm for more information.
- IBM_DB is not supported on JRuby. As stated in the JRuby Wiki, "Basics of Getting JRuby Running":
'You may install other gems, but keep in mind that libraries with C extension dependencies
will not work in JRuby.' http://www.headius.com/jrubywiki/index.php/Getting_Started
The IBM_DB adapter relies on IBM_DB driver (C extension) and the IBM Driver for ODBC and
CLI to access databases on IBM data servers. Alternatively, you can either use the regular C
implementation of Ruby, or use ActiveRecord-JDBC adapter to access databases.
- The following tests are expected to fail on DB2 LUW
- test_read_attributes_before_type_cast_on_datetime
- test_to_xml
- test_native_types
- test_counting
- test_counting_with_column_name_and_hash
- test_counting_with_empty_hash_conditions
- test_counting_with_single_conditions
- test_counting_with_single_hash

Note :- 1) The test cases from HasManyAssociations (4-8) above are found failing only when run as part of
the complete suite. However they pass when run standalone.
2) Also there are two test cases (test_validate_uniqueness_with_non_standard_table_names, test_update_all_with_non_standard_table_name)which run against table with non-standard name. Given that DB2/IDS is standard compliant these test cases are expected to fail.
To have these test cases passing rename the fixtures file warehouse-things to warehouse_things.

- The test cases do not follow the DB2 rules are expectedto fail

Unicode Support

- Data returned from the driver will be in UTF8 encoding format.
- The input data to the driver can be in any Ruby supported encoding format.

To Do

- Support ActiveRecord remove_column method for DB2 zOS
- Open issues in Github

Feedback

Your feedback is very much appreciated and expected through github:
- github issue: https://github.com/ibmdb/ruby-ibmdb/issues