freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Question
- Date: Sat, 10 May 2008 10:32:48 +0200
Il giorno sab, 10/05/2008 alle 02.32 -0400, Federico Alves ha scritto:
> Dear Freddy
>
> My entire business almost collapsed today because fteetds opens the
> connections with "set implicit transactions on", versus OFF. I also found
> out why. If I define in freetds.conf my section [minixel] and include "tds
> version =8.0", the setting is correct: "implicit transactions off", but
> then, the parameter passing for any stored procedures doesn't work anymore.
> So to make them work, I started to remove the "tds version 8.0" from my
> freetds.conf, and it was a catastrophe. I had to pay support to Microsoft to
> debug this until they found the problem.
>
> Can we make the parameters work with SQL 2005 without needing to remove the
> "tds version=8.0"? The parameter-passing with Sybase attribute still work
> in SQL 2005. I need both parameter-passing and "implicit transactions off"
> when connecting. For example, this perl code:
>
> do {
>
> while(my $dat = $sth->fetch) {
>
> print "TYPE $sth->{syb_result_type}\n";
>
> print "Data @$dat[0] , @$dat[1] , @$dat[2] \n";
>
> if($sth->{syb_result_type} == 4042) { # it's a PARAM result
>
> print "Number: $dat->[0] \n";
>
> print "Varpar: $dat->[1] \n";
>
> }
>
> }
>
> } while($sth->{syb_more_results});
>
>
>
> Does not work as expected when the "Tds version=8.0" is included, but
> actually TDS version 8.0 must work because if you do not define it, the
> behavior is perfect.
>
This is quite strange. I just tried with 0.82 with all combinations of
mssql 2000/mssql 2005/mssql 2008 and tds version 4.2/7.0/8.0 and result
is the same, implicit transactions are OFF in all cases (you can check
this doing "select @@options & 2"). However it can happen that somebody
change default setting in the database using sp_configure.
1> sp_configure 'user options'
2> go
name minimum maximum config_value run_value
user options 0 32767 0 0
(1 row affected)
(return status = 0)
Here you can see my values is 0 (fourth number that should be the same
of third), if it contains 2, that is (user_options & 2) != 0 in C
connection get implicit transactions on by default.
I remember that you get another problem with this flag. If this is true
it can be that some administrator is playing too much with the
configuration or that you have some type of corruption (very difficult)
freddy77
-
[freetds] Question,
Federico Alves, 05/10/2008
- Re: [freetds] Question, Frediano Ziglio, 05/10/2008
Archive powered by MHonArc 2.6.24.