IBM Support

Configuring SSL ODBC connection to BigSQL database using DB2 ODBC driver - Hadoop Dev

Technical Blog Post


Abstract

Configuring SSL ODBC connection to BigSQL database using DB2 ODBC driver - Hadoop Dev

Body

Overview:
This blog will provide the steps for creating SSL ODBC connection to BigSQL database using DB2 ODBC driver on Windows.

Assumptions:

  • On the database server side, BigSQL database is already SSL enabled. Please refer this for complete instructions.
  • On the database client system, the DB2 ODBC driver or DB2 Client is installed. You can download it from here.
  • SSL certificate file from server is copied on client. e.g. I have copied abc.arm file in C:\temp\tabSSL_new, on client machine.

Steps:

1> Open ODBC driver manager. Click ‘Add’ to create a new ‘User DSN’.

Add

2> Select DB2 ODBC driver using which you want to try this connection and click ‘Finish’.

driver

3> In the pop-up window, enter new Data Source Name. Ignored the Database alias field as I did not have BIGSQL database cataloged on DB2 Client.

dsn

4> You will see a new DSN created. Click on ‘Configure’.

config

5> In the ‘Data Source’ tab, enter User ID and Password for your BIGSQL database and click on ‘Advanced Settings’

user

6> In the Advanced Settings, ‘Add’ properties as below:
Database (BIGSQL) , Hostname ( IP/ Hostname of BigSQL head node), Port (on which BigSQL SSL service is running), Security (SSL) . ‘Apply’ the changes.

adv

7> In ODBC Driver Manager GUI, there is no option to specify ‘SSLServerCertificate’ property. Edit your db2cli.ini file to include SSLServerCertificate keyword, pointing to the path of your certificate file.

db2cli

Location of db2cli.ini file varies based on the flavor of DB2 client product you have. Check this to figure out the exact location of db2cli.ini file specific to your DB2 product.

If you have complete DB2 Client installed, alternatively you can edit the db2cli.ini file from DB2 command line using the command:

db2 update cli cfg for section ‘<>’ using SSLServerCertificate ‘<>’

eg.

c:\temp\tabSSL_new>db2 update cli cfg for section bigsqlODBC using SSLServerCertificate C:\temp\tabSSL_new\abc.arm

8> Close and start the ODBC driver manager. Now you will see properties listed as below:

SSLprop

9> Test the connection.

test

And you have just created SSL ODBC connection!

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCRJT","label":"IBM Db2 Big SQL"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm16260037