Re: Pain with heterogenous services (DG4ODBC)

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Mon, 7 Jan 2013 21:49:28 +0000 (UTC)
Message-ID: <pan.2013.01.07.21.49.19_at_gmail.com>



On Mon, 07 Jan 2013 13:21:17 -0800, joel garry wrote:

> Guess you'll have to use something newer than O6 lol

I'm still on 5.1.22 on VAX/VMS 4.7

>
> But seriously, even winblows can update with odbc, I take it you are
> using some unix thing?

Linux (CentOS 6.3)
[mgogala_at_db2 tmp]$ rpm -qa|grep unixODBC unixODBC-devel-2.2.14-12.el6_3.x86_64
unixODBC-2.2.14-12.el6_3.x86_64

[db2inst1_at_db2 ~]$ db2cli validate -dsn DB2_SAMPLE IBM DATABASE 2 Interactive CLI Sample Program (C) COPYRIGHT International Business Machines Corp. 1993,1996 All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.   



  [ CLI Driver Version : 10.01.0000 ]
  [ Informational Tokens : "DB2
v10.1.0.0","s120403","LINUXAMD64101","Fixpack 0" ]   [ CLI Driver Type : IBM Data Server Runtime Client ]   

db2cli.ini Validation :   



  [ DB2CLIINIPATH env var : unset ]
  [ db2cli.ini Path : /home/db2inst1/sqllib/cfg/db2cli.ini ]   

  [ Keywords used by CLI for DSN: DB2_SAMPLE ]
    Keyword                                      Value
    --------------------------------------------------
    DATABASE                                     SAMPLE
    PROTOCOL                                     TCPIP
    PORT                                         50000
    HOSTNAME                                     db2
    UID                                          mgogala
    PWD                                          *******
    CURRENTSCHEMA                                SCOTT
  
---------------------------------------------------------------------------


db2dsdriver.cfg Validation :   



  [ DB2DSDRIVER_CFG_PATH env var : unset ]   [ db2dsdriver.cfg Path : /home/db2inst1/sqllib/cfg/ db2dsdriver.cfg ]   

  [ Valid keywords used for DSN : DB2_SAMPLE ]
    Keyword                                      Value
    --------------------------------------------------
    USERID                                       mgogala
    PASSWORD                                     *******
  
---------------------------------------------------------------------------

The validation completed.

Here is the test with the isql utility, a part of the Linux ODBC package:

mgogala_at_db2 tmp]$ echo 'SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info())'|isql db2_sample

+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info())
+---------------------------------------------------------------------------------------------------------------------------------
+------------+
|
SERVICE_LEVEL | FIXPACK_NUM|
+---------------------------------------------------------------------------------------------------------------------------------
+------------+
| DB2
v10.1.0.0                                                                                                                   
| 0          |
+---------------------------------------------------------------------------------------------------------------------------------
+------------+
SQLRowCount returns -1
1 rows fetched

>
> I note from the gateway docs even it requires the use of the sqlplus
> copy command:

I will try installing native DB2 gateway, just for the testing purposes. The problem with the ODBC gateway is that is free. If it was very useful, people wouldn't be buying the real thing. ODBC is just a teaser. IBM has something called DB federation, I haven't gotten a grasp on that yet. That would connect from the DB2 side. There was a guy named Serge Rielau who was working for IBM and actively participating in this group. Do you know if he's still active? Having him around would be a great thing.

-- 
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com
Received on Mon Jan 07 2013 - 22:49:28 CET

Original text of this message