You can test the ODBC database connectivity with the db2dsdriver.cfg file to ensure that the db2dsdriver.cfg file is valid and the ODBC driver manager is configured correctly.
You must ensure that the CLI driver is installed and the db2dsdriver.cfg file is created in your environment with a required data source name (DSN) entry. You can use the contents of the db2dsdriver.cfg.sample file to create the db2dsdriver.cfg file.
You also must install the ODBC driver manager and configure it to use the DB2® ODBC driver. To install and configure the unixODBC driver manager, see Sample build scripts and configurations for the unixODBC Driver Manager
To test the ODBC connectivity with the db2dsdriver.cfg file:
$ isql sampledsn
+---------------------------------------
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>