Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 27BA5633AE9 for ; Wed, 7 Apr 2010 17:07:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 20250-04 for ; Wed, 7 Apr 2010 20:07:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og124.obsmtp.com (exprod7og124.obsmtp.com [64.18.2.26]) by mail.postgresql.org (Postfix) with SMTP id 26DF8632F00 for ; Wed, 7 Apr 2010 17:07:05 -0300 (ADT) Received: from source ([74.125.92.25]) by exprod7ob124.postini.com ([64.18.6.12]) with SMTP ID DSNKS7zl573c96w26w77TI4kBZLEQDHwFAn3@postini.com; Wed, 07 Apr 2010 13:07:04 PDT Received: by qw-out-2122.google.com with SMTP id 8so470165qwh.51 for ; Wed, 07 Apr 2010 13:07:03 -0700 (PDT) Received: by 10.224.106.4 with SMTP id v4mr3400063qao.36.1270670823129; Wed, 07 Apr 2010 13:07:03 -0700 (PDT) Received: from [192.168.2.34] (va-76-4-65-131.sta.embarqhsd.net [76.4.65.131]) by mx.google.com with ESMTPS id 2sm6575475qwi.9.2010.04.07.13.07.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Apr 2010 13:07:02 -0700 (PDT) Cc: pgsql-odbc@postgresql.org Message-Id: <6BFA5CA2-6B54-4EA2-AD26-EF6F00115ABF@enterprisedb.com> From: Korry Douglas To: Jonathan Foy In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Acucobol, ODBC and Postgres Date: Wed, 7 Apr 2010 16:06:57 -0400 References: X-Mailer: Apple Mail (2.936) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=-10 required=5 tests=BAYES_40=-0.185, URI_NOVOWEL=0.5 X-Spam-Level: X-Archive-Number: 201004/3 X-Sequence-Number: 10227 > I'm trying to configure the postgres odbc driver with our Acucobol > application (5.2 and 8.1), and was hoping that someone out there > might have some experience with this. > > The application currently connects to our postgres databases (8.1.3 > up to 8.4.2) without issue. The problem came up when I started > trying to use pgbouncer. I had it up and running from the command > line, but connections coming from the application are rejected due > to a "bad packet header", which seems to be because the connect > packets are coming in with V2 in the data, and pgbouncer only > supports V3. So, we downloaded the latest driver, compiled it (RHEL > 5.4), and (in theory) recompiled cobol with the new library > (libodbcpsql.so.2.0.0) linked in. There was no apparent change. > > The application can still parse the odbc.ini file to get the > database name, server, port, user, and password, but any additional > settings seem to be ignored. I can't get any logging, I can't set > the Protocol version...I'm not convinced that the proper driver is > being used. > > Does anyone have any ideas? Pulling my hair out... I would start by running strace on your application while it is trying to connect. When I've run into kind of problem that you describe, I've found that the ODBC Driver Manager is reading the wrong odbc.ini file (for example, reading from /etc/odbc.ini when I expected /usr/ local/etc/odbc.ini). Just run: $ strace -o /tmp/myapp.trc Then look through the /tmp/myapp.trc file, searching for attempts to open odbc.ini, odbcinst.ini, and the libodbcpsql.so library. -- Korry ----------------------------------------------------------------------- Korry Douglas Senior Database Dude EnterpriseDB Corporation The Enterprise Postgres Company Phone: (804)241-4301 Mobile: (620) EDB-NERD