db2ibm-cloud

install db2 client on mac


When navigating here https://www.ibm.com/docs/en/db2-warehouse?topic=installing-mac-os-x I get the "installDSDriver.sh" but that doesnt help as I dont see where I can download a dmg or something. I need this as i am using unixODBC to load the db2 driver and then be able to run some automated tests that are using db2 database

I have also seen this https://www.ibm.com/docs/en/db2/11.5?topic=system-macos which may work but the lift to get this working would not be worth it for the existing automation tests.

The way I am currently able to connect to db2 at all is via jdbc (using myeclipse) but again would need the driver locally to be able to run these tests.

If anyone can point me in the right direction that would be greatly appreciated

System Apple M3 with OSX 14.3


Solution

  • For apple silicon, you have to use x64 emulation, and install an x64 Db2 client.

    That is because at present date there is no native Db2-driver for apple silicon available from IBM corporation.

    The x64 unixODBC can use the tiny footprint clidriver from IBM (for x64 emulation). That has a zero install option (i.e. it is a zipfile (or gzip file) that you can unzip and use if you are emulating x64).

    Read about clidriver on the Db2 Knowledge Center pages. You might need to read many of the pages to learn all the required steps, and also all the configuration options. But that is not programming, just reading the docs...

    In addition, if your target database is running EITHER on Z/OS (native) or on i-series, then additionally may need a license file (Db2-connect personal) , depending on your server setup/configuration.

    Although to remotely access Db2 for i-series, you should definitely not use clidriver but instead use the driver that comes with the i-series access odbc option. This has bindings for ODBC access (although its implementation may be java). If using the i-series access ODBC driver, you need to carefully study ALL of the documentation provided with that option. For any queries relating to that product, refer to IBM, via your IBM i support channel.

    When your Db2 database runs on Linux, or Unix or Windows or cloud then you do NOT need a license file with clidriver.

    For macos , try unzip and untar from here: https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz