Thursday, April 17, 2014

Another look at the DB2 client

Triggered by this
I have been playing/learning about the new way of configuring db2 clients.

It seems that the “db2 catalog tcpip node” syntax is soo 2013 and db2cli is not only an .ini file anymore, but also a real db2 command. This combined with the noble art of selection the right version justifies the time spent on this subject.

When you look at the size of some versions (ODBC/CLI only 33 MB) you cannot help thinking that the 'old way'  is not going to work because the db2cmd shell on windows will not be there anymore.
So no more db2 commands. Scary thought.

I will not go into detail because the links mentioned earlier covers it just fine and I've got nothing to add. The only thing I want to mention is that an external database configured the new way:
  • not found in “db2 list db directory"
  • present in the db2dsdriver.cfg file
can be used by clpplus & odbc but a simple “db2 connect to” will not work. The good old  db2cmd box does not seem to use the new file. The situation described by Ian in his blog could not be re-produced by me.

Very nice all but:

  • the db2cli.ini file is still there and is being used
  • the db2dsdriver.cfg file seems to have a lot of overlap in functionality with db2cli.ini, so what would be the best approach? Do we still need the db2cli.ini or is the configuration ideally 100% described in the db2dsdriver.cfg?
  • The db2cli.ini file must be maintained using the “db2 update cli cfg”  command, so the db2cmd box is still required (yes you can edit by hand, but a worthy DBA does not do that kind of things, right?)
So, I do not know about you, but it is not yet clear to me. Hope IBM clarifies things soon.

Next I was involved with a project in which a windows 2008 server needed an ODBC connection  to the db2-mainframe without using the db2 connect gateway like we always do. 

IBM sales told us that this solution is becoming obsolete and nowadays the CLI clients can connect directly to the mainframe, just like their JDBC type 4 cousins. Just add the licence file.

Aha! Now I can use my fresh knowledge about the db2cli command creating the db2dsdriver.cfg file! 

I know the new way of:
・    catalog tcpip node
・    catalog database
・    catalog system odbc

and that is enough to configure a perfect ODBC connection to a LUW database. 

For the mainframe I need 1 additional line and I only have to ask Google the new syntax to “catalog dcs db” and it will work.....



<knock>  <knock>

I asked you a question.....


Silence.... No hits... No go..

Bottom line: 
  • Yes I managed to import our connect licence file in the client
  • Yes I managed to make a connection from CLI/ODBC to the mainframe bypassing the connect gateway
  • No I could not configure the connection using the new db2dsdriver.cfg file for the mainframe. 
  • The catalog-knowledge inside my head is still valuable :)

IBM: please correct me if I am wrong.

No comments:

Post a Comment