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

* SQL_QUERY_TIMEOUT
@ 2017-05-05 13:09  Ondrej Dzivy Balucha <balucha@horizon.sk>
  0 siblings, 1 reply; 6+ messages in thread

From: Ondrej Dzivy Balucha @ 2017-05-05 13:09 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

I found that in psqlODBC 09.05.0300 Release was implemented 
SQL_QUERY_TIMEOUT.
How it works?
I need to set up odbc connection in Debian, that send me error(disconnet 
dead connection) after defined time, but I can`t find how can I setup 
SQL_QUERY_TIMEOUT in odbc.ini.
I have installed latest odbc driver(09.06.0200)

Regards

-- 
Ondrej Dzivy Balucha
Horizon, s.r.o. Prešov
Francisciho 21
08001 Prešov
tel/fax +421517491400/02


-- 
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: SQL_QUERY_TIMEOUT
@ 2017-05-06 02:59  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Ondrej Dzivy Balucha <balucha@horizon.sk>
  0 siblings, 1 reply; 6+ messages in thread

From: Inoue, Hiroshi @ 2017-05-06 02:59 UTC (permalink / raw)
  To: Ondrej Dzivy Balucha <balucha@horizon.sk>; +Cc: pgsql-odbc

Hi Ondrej,

On 2017/05/05 22:09, Ondrej Dzivy Balucha wrote:
> Hi,
>
> I found that in psqlODBC 09.05.0300 Release was implemented 
> SQL_QUERY_TIMEOUT.
> How it works?

Please call ODBC API like

     SQLSetStmtAttr(hstmt, SQL_ATTR_QUERY_TIMEOUT, (void *) timeout, 0);

regards,
Hiroshi Inoue

> I need to set up odbc connection in Debian, that send me 
> error(disconnet dead connection) after defined time, but I can`t find 
> how can I setup SQL_QUERY_TIMEOUT in odbc.ini.
> I have installed latest odbc driver(09.06.0200)
>
> Regards



-- 
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: SQL_QUERY_TIMEOUT
@ 2017-05-09 09:13  Ondrej Dzivy Balucha <balucha@horizon.sk>
  parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  0 siblings, 1 reply; 6+ messages in thread

From: Ondrej Dzivy Balucha @ 2017-05-09 09:13 UTC (permalink / raw)
  To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-odbc

Hi,

This is only way to use SQL_QUERY_TIMEOUT?
Can I setup this in odbc.ini like global parameter for all my 
connections (applications)?
It can be useful to independently check/break (outside application - 
when using third-party applications ) dead connection or unexpected long 
running query or other communication error.

Other databases(ODBC clients) has parameter to set up this in config file.
For example DB2 ODBC client has parameter ReceiveTimeout where I can 
setup how many second client wait for response from server. After this 
timeout client return communication error. This is great parameter for 
situation when I use third-party applications, for example.

Regards

Ondrej Dzivy Balucha
Horizon, s.r.o. Prešov
Francisciho 21
08001 Prešov
tel/fax +421517491400/02

On 06.05.2017 04:59, Inoue, Hiroshi wrote:
> Hi Ondrej,
>
> On 2017/05/05 22:09, Ondrej Dzivy Balucha wrote:
>> Hi,
>>
>> I found that in psqlODBC 09.05.0300 Release was implemented
>> SQL_QUERY_TIMEOUT.
>> How it works?
>
> Please call ODBC API like
>
>     SQLSetStmtAttr(hstmt, SQL_ATTR_QUERY_TIMEOUT, (void *) timeout, 0);
>
> regards,
> Hiroshi Inoue
>
>> I need to set up odbc connection in Debian, that send me
>> error(disconnet dead connection) after defined time, but I can`t find
>> how can I setup SQL_QUERY_TIMEOUT in odbc.ini.
>> I have installed latest odbc driver(09.06.0200)
>>
>> Regards
>


-- 
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: SQL_QUERY_TIMEOUT
@ 2017-05-09 11:25  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Ondrej Dzivy Balucha <balucha@horizon.sk>
  0 siblings, 0 replies; 6+ messages in thread

From: Inoue, Hiroshi @ 2017-05-09 11:25 UTC (permalink / raw)
  To: Ondrej Dzivy Balucha <balucha@horizon.sk>; +Cc: pgsql-odbc

Hi Ondrej,

On 2017/05/09 18:13, Ondrej Dzivy Balucha wrote:
> Hi,
>
> This is only way to use SQL_QUERY_TIMEOUT?

In 9.06.0300, you can set ConnSettings(commands sent to backend on 
connection)
in odbc.ini like

ConnSettings = set statement_timeout=30

regards,
Hiroshi Inoue

>
> Can I setup this in odbc.ini like global parameter for all my 
> connections (applications)?
> It can be useful to independently check/break (outside application - 
> when using third-party applications ) dead connection or unexpected 
> long running query or other communication error.
>
> Other databases(ODBC clients) has parameter to set up this in config 
> file.
> For example DB2 ODBC client has parameter ReceiveTimeout where I can 
> setup how many second client wait for response from server. After this 
> timeout client return communication error. This is great parameter for 
> situation when I use third-party applications, for example.
>
> Regards
>
> Ondrej Dzivy Balucha
> Horizon, s.r.o. Prešov
> Francisciho 21
> 08001 Prešov
> tel/fax +421517491400/02
>
> On 06.05.2017 04:59, Inoue, Hiroshi wrote:
>> Hi Ondrej,
>>
>> On 2017/05/05 22:09, Ondrej Dzivy Balucha wrote:
>>> Hi,
>>>
>>> I found that in psqlODBC 09.05.0300 Release was implemented
>>> SQL_QUERY_TIMEOUT.
>>> How it works?
>>
>> Please call ODBC API like
>>
>>     SQLSetStmtAttr(hstmt, SQL_ATTR_QUERY_TIMEOUT, (void *) timeout, 0);
>>
>> regards,
>> Hiroshi Inoue
>>
>>> I need to set up odbc connection in Debian, that send me
>>> error(disconnet dead connection) after defined time, but I can`t find
>>> how can I setup SQL_QUERY_TIMEOUT in odbc.ini.
>>> I have installed latest odbc driver(09.06.0200)
>>>
>>> Regards


-- 
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

* SQL_QUERY_TIMEOUT
@ 2017-08-01 18:22  Keith Handlon <Keith.Handlon@sas.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Keith Handlon @ 2017-08-01 18:22 UTC (permalink / raw)
  To: pgsql-odbc

When SQL_QUERY_TIMEOUT was added it was defined as SQLULEN as per the current ms odbc spec.  But as of 3.5 wasn't it a SQLUINTEGER?

It looks like the majority of the other attributes like (SQL_NOSCAN, SQL_RETRIEVE_DATA, etc) are defined as SQLUINTEGER.

This could cause a memory overwrite if its treated like an SQLUINTEGER like the other attributes.

Thanks,
Keith

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

* Re: SQL_QUERY_TIMEOUT
@ 2017-08-02 05:05  Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
  parent: Keith Handlon <Keith.Handlon@sas.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Inoue, Hiroshi @ 2017-08-02 05:05 UTC (permalink / raw)
  To: Keith Handlon <Keith.Handlon@sas.com>; +Cc: pgsql-odbc

Hi Keith,

On 2017/08/02 3:22, Keith Handlon wrote:
>
> When SQL_QUERY_TIMEOUT was added it was defined as SQLULEN as per the 
> current ms odbc spec.  But as of 3.5 wasn’t it a SQLUINTEGER?
>

Probably they were described when there was no 64bit ODBC.
SQLULEN == SQLUINTEGER on 32bit ODBC,

regards,
Hiroshi Inoue

> It looks like the majority of the other attributes like (SQL_NOSCAN, 
> SQL_RETRIEVE_DATA, etc) are defined as SQLUINTEGER.
>
> This could cause a memory overwrite if its treated like an SQLUINTEGER 
> like the other attributes.
>
> Thanks,
>
> Keith
>

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


end of thread, other threads:[~2017-08-02 05:05 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 13:09 SQL_QUERY_TIMEOUT Ondrej Dzivy Balucha <balucha@horizon.sk>
2017-05-06 02:59 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2017-05-09 09:13   ` Ondrej Dzivy Balucha <balucha@horizon.sk>
2017-05-09 11:25     ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2017-08-01 18:22 SQL_QUERY_TIMEOUT Keith Handlon <Keith.Handlon@sas.com>
2017-08-02 05:05 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>

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