Closed stoeps13 closed 2 years ago
Thanks for raising this issue. It will be fixed in the next push.
The documentation tells to copy db2jcc.jar, I need to doublecheck what DB2 installs, but I normally copy db2jcc.jar, db2jcc4.jar and the lic.jar
Thanks for the PR https://github.com/HCL-TECH-SOFTWARE/connections-automation/pull/189. I checked v11.1.4fp5_jdbc_sqlj.tar.gz where we have both the files(db2jcc4.jar and db2jcc.jar). But in v11.5.6fp5_jdbc_sqlj.tar.gz db2jcc.jar is not available. So depending on the availability we can copy db2jcc4.jar and/or db2jcc.jar. I will update the code in Jan21 release. Code snippet -
- name: "stat db2jcc4"
stat: path="{{ __db2_jdbc_location }}/db2jcc4.jar"
register: db2jcc4_exists
- name: "stat db2jcc"
stat: path="{{ __db2_jdbc_location }}/db2jcc.jar"
register: db2jcc_exists
- name: "Copy DB2 JDBC files"
copy:
src: "{{ __db2_jdbc_location }}/{{ item }}"
dest: "{{ __jdbc_destination }}"
remote_src: yes
with_items:
- "{{ 'db2jcc4.jar' if db2jcc4_exists.stat.exists else 'db2jcc.jar' }}"
- "{{ 'db2jcc.jar' if db2jcc_exists.stat.exists else 'db2jcc4.jar' }}"
- "db2jcc_license_cu.jar"
when:
- "'db2_servers' in groups"
Update- db2jcc.jar is deprecated so we are upgrading to the db2jcc4.jar driver. db2jcc.jar won't be copied hereafter. link- https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads
- name: "Copy DB2 JDBC files"
copy:
src: "{{ __db2_jdbc_location }}/{{ item }}"
dest: "{{ __jdbc_destination }}"
remote_src: yes
with_items:
- "db2jcc4.jar"
- "db2jcc_license_cu.jar"
when:
- "'db2_servers' in groups"
Addressed in Feb 2022 release.
Why does the TDI installation rename files in DB2?
https://github.com/HCL-TECH-SOFTWARE/connections-automation/blob/d4dc1a04d57942cbe66c0e159c62357d0d40342e/roles/third_party/ibm/tdi-install/tasks/tdisol_install.yml#L93-L119
So the file is renamed in DB2/java folder and then copied to TDI. It never was necessary to do so, but it will break other things, because db2jcc.jar and db2cc4.jar are two different kinds of jdbc drivers:
So you break backwards compatibility in the driver. Just let the files as installed by DB2 setup and copy db2jcc4.jar to TDI, no need to rename!