Skip to Content.
Sympa Menu

freetds - Re: [freetds] Multiples connections is locking

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: João Marcelo Loureiro do Amaral <joaomarcelobsb AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Multiples connections is locking
  • Date: Wed, 16 Dec 2009 15:07:55 +0000

Frediano, you are my hero! :D...

Thank you very very much!

Worked very well!

Merry christmas for you!!

:-)...

2009/12/16 Frediano Ziglio <freddy77 AT gmail.com>

> 2009/12/16 João Marcelo Loureiro do Amaral <joaomarcelobsb AT gmail.com>:
> > Hi Frediano, I need your help, please!
> > I built an application using unixODBC with FreeTDS (SQLServer 2000). And
> I
> > found a critical problem when I use multiple connections!
> > I built a Stored Procedure in my BD that stays in slow loop, and I built
> an
> > other Stored Procedure that returns very quickly.
> > I created a thread (posix) to execute the first procedure, and I created
> an
> > other thread to execute the second procedure (that returns fast).
> > I am not sharing any handles between the threads (Enviroment, Connection
> or
> > Statement) and I am not using mutex control, but the second thread locks
> > when try to use any handle (Enviroment by example).
> > First I created thread that executes slow procedure, and after 1 second,
> I
> > create thread that executes fast procedure. But the second procedure only
> > returns after the first ends.
> > I built same example in ODBC32 and works well!
> > Please help me!
> > I am migrating from windows to linux, and I am needing this very much!
> Any
> > help are welcome!
> > Sorry by my english...
> >
>
> .... omissis ...
>
> It's a known problem. By default unixODBC apply a threading model 3
> that serialize every calls of a driver. It's safe to use a threading
> of 1. To specify this however you have to use odbcinst.ini like
>
> /etc/odbcinst.ini
>
> [FreeTDS]
> Driver = /path/to/our/libtdsodbc.so
> Threading = 1
>
> and in odbc specify the driver using odbcinst.ini, like
>
> /etc/odbc.ini (or ~/.odbc.ini or another file with overriding)
>
> [dsnname]
> Driver = FreeTDS
> Server = dns_server_name
> Port = your_port
> TDS_Version = 8.0
>
> or use a connect string with driver parameter like
>
> "DRIVER=FreeTDS;SERVER=dns_server_name;PORT=your_port;TDS_Version=8.0"
>
> freddy77
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



--
João M L Amaral




Archive powered by MHonArc 2.6.24.

Top of Page