pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ODBC SELECT Timeout
6+ messages / 3 participants
[nested] [flat]

* ODBC SELECT Timeout
@ 2013-05-22 17:08 ter062424 <ter062424@gmail.com>
  2013-05-24 21:13 ` Re: ODBC SELECT Timeout Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 1 reply; 6+ messages in thread

From: ter062424 @ 2013-05-22 17:08 UTC (permalink / raw)
  To: pgsql-odbc

Hello,

I have a very large, long running query that is being run on a CentOS 6
Linux box from an application using unixODBC 2.2.14 and postgresql-odbc 8.4. 
The target database is a postgreSQL 8.4 DB on another CentOS 6 Linux box.

When run, the query runs for about one hour and then dies with the following
error:

for SQL input object "SQL-AR":  SQLNumResultCols: -1/1; S1000/[unixODBC]No
query has been executed with that handle

I'm no overly familiar with using ODBC and have been researching this as
best as I can.  I've tried to add UseDeclareFetch to /etc/odbcinst.ini as
well, thinking that may be the cause.  Note that other queries run fine. 
I'm not sure if it is timing out, or what is happening.  Does anyone know
what this error could mean, and if there is anything I can put in my
/etc/odbcinst.ini to help resolve the problem.

My /etc/odbcinst.ini currently looks like this:

[PostgreSQL]
Description             = ODBC for PostgreSQL
Driver          = /usr/lib/psqlodbc.so
Setup           = /usr/lib/libodbcpsqlS.so
Driver64                = /usr/lib64/psqlodbc.so
Setup64         = /usr/lib64/libodbcpsqlS.so
UseDeclareFetch         = 1
Fetch           = 100
UseServerSidePrepare            = 0
FileUsage               = 1
UsageCount              = 2

I'm have the 64 bit drivers installed and it sees those okay.  Thanks for
any help or a point in the right direction.  I'm just starting to really dig
into postgreSQL, so do not know much quite yet.

Regards,
Tom



--
View this message in context: http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ODBC SELECT Timeout
  2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
@ 2013-05-24 21:13 ` Hiroshi Inoue <inoue@tpf.co.jp>
  2013-05-24 21:42   ` Re: ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-05-28 20:20   ` Re: ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Hiroshi Inoue @ 2013-05-24 21:13 UTC (permalink / raw)
  To: ter062424 <ter062424@gmail.com>; +Cc: pgsql-odbc

Hello,

(2013/05/23 2:08), ter062424 wrote:
> Hello,
>
> I have a very large, long running query that is being run on a CentOS 6
> Linux box from an application using unixODBC 2.2.14 and postgresql-odbc 8.4.
> The target database is a postgreSQL 8.4 DB on another CentOS 6 Linux box.
>
> When run, the query runs for about one hour and then dies with the following
> error:
>
> for SQL input object "SQL-AR":  SQLNumResultCols: -1/1; S1000/[unixODBC]No
> query has been executed with that handle
>
> I'm no overly familiar with using ODBC and have been researching this as
> best as I can.  I've tried to add UseDeclareFetch to /etc/odbcinst.ini as
> well, thinking that may be the cause.  Note that other queries run fine.
> I'm not sure if it is timing out, or what is happening.  Does anyone know
> what this error could mean, and if there is anything I can put in my
> /etc/odbcinst.ini to help resolve the problem.
>
> My /etc/odbcinst.ini currently looks like this:
>
> [PostgreSQL]
> Description             = ODBC for PostgreSQL
> Driver          = /usr/lib/psqlodbc.so
> Setup           = /usr/lib/libodbcpsqlS.so
> Driver64                = /usr/lib64/psqlodbc.so
> Setup64         = /usr/lib64/libodbcpsqlS.so
> UseDeclareFetch         = 1
> Fetch           = 100
> UseServerSidePrepare            = 0

Could please try
   UseServerSidePrepare = 1
?

regards,
Hiroshi Inoue



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ODBC SELECT Timeout
  2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-05-24 21:13 ` Re: ODBC SELECT Timeout Hiroshi Inoue <inoue@tpf.co.jp>
@ 2013-05-24 21:42   ` ter062424 <ter062424@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: ter062424 @ 2013-05-24 21:42 UTC (permalink / raw)
  To: pgsql-odbc

Hello Hiroshi,

Thank you for the response.  It'll be four days until I can test this, but
I will definitely do as you suggested and let the list know how it turns
out.  Thanks again for the help.

Regards,
Tom


On Fri, May 24, 2013 at 5:14 PM, Hiroshi Inoue [via PostgreSQL] <
ml-node+s1045698n5756812h34@n5.nabble.com> wrote:

> Hello,
>
> (2013/05/23 2:08), ter062424 wrote:
>
> > Hello,
> >
> > I have a very large, long running query that is being run on a CentOS 6
> > Linux box from an application using unixODBC 2.2.14 and postgresql-odbc
> 8.4.
> > The target database is a postgreSQL 8.4 DB on another CentOS 6 Linux
> box.
> >
> > When run, the query runs for about one hour and then dies with the
> following
> > error:
> >
> > for SQL input object "SQL-AR":  SQLNumResultCols: -1/1;
> S1000/[unixODBC]No
> > query has been executed with that handle
> >
> > I'm no overly familiar with using ODBC and have been researching this as
> > best as I can.  I've tried to add UseDeclareFetch to /etc/odbcinst.ini
> as
> > well, thinking that may be the cause.  Note that other queries run fine.
> > I'm not sure if it is timing out, or what is happening.  Does anyone
> know
> > what this error could mean, and if there is anything I can put in my
> > /etc/odbcinst.ini to help resolve the problem.
> >
> > My /etc/odbcinst.ini currently looks like this:
> >
> > [PostgreSQL]
> > Description             = ODBC for PostgreSQL
> > Driver          = /usr/lib/psqlodbc.so
> > Setup           = /usr/lib/libodbcpsqlS.so
> > Driver64                = /usr/lib64/psqlodbc.so
> > Setup64         = /usr/lib64/libodbcpsqlS.so
> > UseDeclareFetch         = 1
> > Fetch           = 100
> > UseServerSidePrepare            = 0
>
> Could please try
>    UseServerSidePrepare = 1
> ?
>
> regards,
> Hiroshi Inoue
>
>
>
> --
> Sent via pgsql-odbc mailing list ([hidden email]<http://user/SendEmail.jtp?type=node&node=5756812&i=0;)
>
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490p5756812.html
>  To unsubscribe from ODBC SELECT Timeout, click here<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=...;
> .
> NAML<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_h...;
>




--
View this message in context: http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490p5756818.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ODBC SELECT Timeout
  2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-05-24 21:13 ` Re: ODBC SELECT Timeout Hiroshi Inoue <inoue@tpf.co.jp>
@ 2013-05-28 20:20   ` ter062424 <ter062424@gmail.com>
  2013-06-02 23:58     ` Re: ODBC SELECT Timeout Inoue, Hiroshi <inoue@tpf.co.jp>
  1 sibling, 1 reply; 6+ messages in thread

From: ter062424 @ 2013-05-28 20:20 UTC (permalink / raw)
  To: pgsql-odbc

Hello Hiroshi,

I set UseServerSidePrepare=1 in /etc/odbcinst.ini and then ran odbcinst -i
-d -f /etc/odbcinst.ini.  The SELECT query over ODBC ran for about 1 hour,
and then died with:

SQLNumResultCols: -1/1; S1000/[unixODBC]No query has been executed with that
handle

One thing I have noticed is that it always runs for about 1 hour (usually
55-59 minutes) before it dies.  Is it possible that something is timing out
on the postgreSQL server side, or ODBC side?  I really appreciate the help
with this, if you have any other advice, I'll be glad to give it a try.  I
did research timeouts on the postgreSQL Server end, but it seemed to
indicate that the default is for it not to time out, and I haven't modified
anything in postgresql.conf except to have the system listen on 5432.

Regards,
Tom



--
View this message in context: http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490p5757210.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ODBC SELECT Timeout
  2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-05-24 21:13 ` Re: ODBC SELECT Timeout Hiroshi Inoue <inoue@tpf.co.jp>
  2013-05-28 20:20   ` Re: ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
@ 2013-06-02 23:58     ` Inoue, Hiroshi <inoue@tpf.co.jp>
  2013-06-03 16:48       ` Re: ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Inoue, Hiroshi @ 2013-06-02 23:58 UTC (permalink / raw)
  To: ter062424 <ter062424@gmail.com>; +Cc: pgsql-odbc

Sorry for teh late reply.

(2013/05/29 5:20), ter062424 wrote:
> Hello Hiroshi,
>
> I set UseServerSidePrepare=1 in /etc/odbcinst.ini and then ran odbcinst -i
> -d -f /etc/odbcinst.ini.

I don't know well about odbcinst.
Does the above operation update odbc.ini?

 > The SELECT query over ODBC ran for about 1 hour,
> and then died with:

Could you try
   explain <the query>
using psql etc?

regards,
Hiroshi Inoue



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: ODBC SELECT Timeout
  2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-05-24 21:13 ` Re: ODBC SELECT Timeout Hiroshi Inoue <inoue@tpf.co.jp>
  2013-05-28 20:20   ` Re: ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
  2013-06-02 23:58     ` Re: ODBC SELECT Timeout Inoue, Hiroshi <inoue@tpf.co.jp>
@ 2013-06-03 16:48       ` ter062424 <ter062424@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: ter062424 @ 2013-06-03 16:48 UTC (permalink / raw)
  To: pgsql-odbc

Hello Hiroshi,

Thank you for your continued help on this, it is greatly appreciated.  The
system with ODBC installed is a CentOS Linux server and has two files:
"/etc/odbc.ini" and "/etc/odbcinst.ini"  The odbcinst.ini file is where the
[PostgreSQL] section is defined, showing the path to the driver, etc.
(Driver64 = /usr/lib64/psqlodbc.so).  That is where I was putting these
values.

Perhaps I should have been putting then in odbc.ini.  I will work on that
and re-test.  I'll also run an EXPLAIN and let you know how it turns out.

Thanks again for the help.
Tom


On Sun, Jun 2, 2013 at 7:59 PM, Inoue, Hiroshi [via PostgreSQL] <
ml-node+s1045698n5757740h2@n5.nabble.com> wrote:

> Sorry for teh late reply.
>
> (2013/05/29 5:20), ter062424 wrote:
> > Hello Hiroshi,
> >
> > I set UseServerSidePrepare=1 in /etc/odbcinst.ini and then ran odbcinst
> -i
> > -d -f /etc/odbcinst.ini.
>
> I don't know well about odbcinst.
> Does the above operation update odbc.ini?
>
>  > The SELECT query over ODBC ran for about 1 hour,
> > and then died with:
>
> Could you try
>    explain <the query>
> using psql etc?
>
> regards,
> Hiroshi Inoue
>
>
>
> --
> Sent via pgsql-odbc mailing list ([hidden email]<http://user/SendEmail.jtp?type=node&node=5757740&i=0;)
>
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490p5757740.html
>  To unsubscribe from ODBC SELECT Timeout, click here<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=...;
> .
> NAML<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_h...;
>




--
View this message in context: http://postgresql.1045698.n5.nabble.com/ODBC-SELECT-Timeout-tp5756490p5757800.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2013-06-03 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 17:08 ODBC SELECT Timeout ter062424 <ter062424@gmail.com>
2013-05-24 21:13 ` Hiroshi Inoue <inoue@tpf.co.jp>
2013-05-24 21:42   ` ter062424 <ter062424@gmail.com>
2013-05-28 20:20   ` ter062424 <ter062424@gmail.com>
2013-06-02 23:58     ` Inoue, Hiroshi <inoue@tpf.co.jp>
2013-06-03 16:48       ` ter062424 <ter062424@gmail.com>

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