From: Korry Douglas <korry.douglas@enterprisedb.com>
To: Jonathan Foy <thefoy@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Acucobol, ODBC and Postgres
Date: Wed, 7 Apr 2010 16:06:57 -0400
Message-ID: <6BFA5CA2-6B54-4EA2-AD26-EF6F00115ABF@enterprisedb.com> (raw)
In-Reply-To: <l2y4b46b5f01004071257qd63c458bg1c49a39411fadb7d@mail.gmail.com>
References: <l2y4b46b5f01004071257qd63c458bg1c49a39411fadb7d@mail.gmail.com>
> 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 <your application name goes here>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: korry.douglas@enterprisedb.com, thefoy@gmail.com
Subject: Re: Acucobol, ODBC and Postgres
In-Reply-To: <6BFA5CA2-6B54-4EA2-AD26-EF6F00115ABF@enterprisedb.com>
References: <l2y4b46b5f01004071257qd63c458bg1c49a39411fadb7d@mail.gmail.com> <6BFA5CA2-6B54-4EA2-AD26-EF6F00115ABF@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox