BALTUS Jean | 2 Oct 2006 13:43
Picon
Favicon

egenix does not find unixodbc library

Hi all,

 

I’ve an Ubuntu 6.06, Zope 2.9.4 with python 2.4.3 UCS 4, freetds 0.61 (source) and unixodbc 2.2.5 (source).

 

The zope process runs under user ‘tony’.

I’ve set the owner of the freetds and unixodbc files to this same user.

 

I’m able to connect to our database with isql or tsql.

 

I’ve  installed the correct egenix mxodbc-zopeda version and get the following message when zope starts:

 

eGenix mxODBC Zope DA: trying iODBC interface... failed: libiodbc.so.2: cannot open shared object file: No such file or directory

eGenix mxODBC Zope DA: trying unixODBC interface... failed: libodbc.so.1: cannot open shared object file: No such file or directory

eGenix mxODBC Zope DA: No usable mxODBC subpackages found.

 

The file libodbc.so.1 exists but egenix does not find it. Do I have to set up something?

 

Thank you in advance,

 

Jean

 

P.S. With Zope 2.7 and python 2.3 using the same config, I did not get any error.

 

###########################################

This message has been scanned by ICT - Africa Museum

________________________________________

2/10/2006 - Filtered through antispam by ICT


_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
M.-A. Lemburg | 2 Oct 2006 13:56
Favicon

Re: egenix does not find unixodbc library

BALTUS Jean wrote:
> Hi all,
> 
>  
> 
> I've an Ubuntu 6.06, Zope 2.9.4 with python 2.4.3 UCS 4, freetds 0.61
> (source) and unixodbc 2.2.5 (source).
> 
>  
> 
> The zope process runs under user 'tony'.
> 
> I've set the owner of the freetds and unixodbc files to this same user.
> 
>  
> 
> I'm able to connect to our database with isql or tsql.
> 
>  
> 
> I've  installed the correct egenix mxodbc-zopeda version and get the
> following message when zope starts:
> 
>  
> 
> eGenix mxODBC Zope DA: trying iODBC interface... failed: libiodbc.so.2:
> cannot open shared object file: No such file or directory
> 
> eGenix mxODBC Zope DA: trying unixODBC interface... failed:
> libodbc.so.1: cannot open shared object file: No such file or directory
> 
> eGenix mxODBC Zope DA: No usable mxODBC subpackages found.
> 
>  
> 
> The file libodbc.so.1 exists but egenix does not find it. Do I have to
> set up something?

It is possible that the linker doesn't know about the file:

ldconfig -p

should list it.

Note that it's also possible that libodbc.so.1 requires another
library that the linker doesn't find. Try running ldd /path/to/libodbc.so.1
as the user you run Zope under. It should print out a list of libs such
as (the example output is from a 64-bit SuSE system):

        libdl.so.2 => /lib64/libdl.so.2 (0x0000002a956e0000)
        libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a957e3000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a958f8000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
(0x000000552aaaa000)

--

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 02 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

BALTUS Jean | 2 Oct 2006 14:35
Picon
Favicon

RE: egenix does not find unixodbc library

Yes indeed ! I've added the unixodbc/lib directory to ldconfig and it
worked.

Now I'm able to add a database connection in Zope but the login fails.
Is it possible that it's because we use special characters in the
password?

With isql for instance I have to surround the password with quote:

isql dsn login 'password'

kind regards,

Jean

-----Original Message-----
From: M.-A. Lemburg [mailto:mal@...] 
Sent: lundi 2 octobre 2006 13:56
To: BALTUS Jean
Cc: egenix-users@...
Subject: Re: [egenix-users] egenix does not find unixodbc library

It is possible that the linker doesn't know about the file:

ldconfig -p

should list it.

Note that it's also possible that libodbc.so.1 requires another
library that the linker doesn't find. Try running ldd
/path/to/libodbc.so.1
as the user you run Zope under. It should print out a list of libs such
as (the example output is from a 64-bit SuSE system):

        libdl.so.2 => /lib64/libdl.so.2 (0x0000002a956e0000)
        libpthread.so.0 => /lib64/tls/libpthread.so.0
(0x0000002a957e3000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a958f8000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
(0x000000552aaaa000)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 02 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
###########################################

This message has been scanned by ICT - Africa Museum

________________________________________
2/10/2006 - Filtered through antispam by ICT

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

BALTUS Jean | 2 Oct 2006 14:45
Picon
Favicon

RE: egenix does not find unixodbc library

Disregard my question about the 'login failed'. If you type the Database
Connection String on one line, it works.

Thank you for your help Marc-Andre Lemburg ! Great product :)

-- Jean

-----Original Message-----
From: egenix-users-bounces@...
[mailto:egenix-users-bounces@...] On Behalf Of BALTUS Jean
Sent: lundi 2 octobre 2006 14:35
To: egenix-users@...
Subject: RE: [egenix-users] egenix does not find unixodbc library

Yes indeed ! I've added the unixodbc/lib directory to ldconfig and it
worked.

Now I'm able to add a database connection in Zope but the login fails.
Is it possible that it's because we use special characters in the
password?

With isql for instance I have to surround the password with quote:

isql dsn login 'password'

kind regards,

Jean

-----Original Message-----
From: M.-A. Lemburg [mailto:mal@...] 
Sent: lundi 2 octobre 2006 13:56
To: BALTUS Jean
Cc: egenix-users@...
Subject: Re: [egenix-users] egenix does not find unixodbc library

It is possible that the linker doesn't know about the file:

ldconfig -p

should list it.

Note that it's also possible that libodbc.so.1 requires another
library that the linker doesn't find. Try running ldd
/path/to/libodbc.so.1
as the user you run Zope under. It should print out a list of libs such
as (the example output is from a 64-bit SuSE system):

        libdl.so.2 => /lib64/libdl.so.2 (0x0000002a956e0000)
        libpthread.so.0 => /lib64/tls/libpthread.so.0
(0x0000002a957e3000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a958f8000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
(0x000000552aaaa000)

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 02 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
###########################################

This message has been scanned by ICT - Africa Museum

________________________________________
2/10/2006 - Filtered through antispam by ICT

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
###########################################

This message has been scanned by ICT - Africa Museum

________________________________________
2/10/2006 - Filtered through antispam by ICT

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

M.-A. Lemburg | 2 Oct 2006 14:48
Favicon

Re: egenix does not find unixodbc library

BALTUS Jean wrote:
> Disregard my question about the 'login failed'. If you type the Database
> Connection String on one line, it works.
> 
> Thank you for your help Marc-Andre Lemburg ! Great product :)

Thanks :-)

> -- Jean
> 
> 
> -----Original Message-----
> From: egenix-users-bounces@...
> [mailto:egenix-users-bounces@...] On Behalf Of BALTUS Jean
> Sent: lundi 2 octobre 2006 14:35
> To: egenix-users@...
> Subject: RE: [egenix-users] egenix does not find unixodbc library
> 
> Yes indeed ! I've added the unixodbc/lib directory to ldconfig and it
> worked.
> 
> Now I'm able to add a database connection in Zope but the login fails.
> Is it possible that it's because we use special characters in the
> password?
> 
> With isql for instance I have to surround the password with quote:
> 
> isql dsn login 'password'
> 
> kind regards,
> 
> Jean
> 
> 
> -----Original Message-----
> From: M.-A. Lemburg [mailto:mal@...] 
> Sent: lundi 2 octobre 2006 13:56
> To: BALTUS Jean
> Cc: egenix-users@...
> Subject: Re: [egenix-users] egenix does not find unixodbc library
> 
> 
> It is possible that the linker doesn't know about the file:
> 
> ldconfig -p
> 
> should list it.
> 
> Note that it's also possible that libodbc.so.1 requires another
> library that the linker doesn't find. Try running ldd
> /path/to/libodbc.so.1
> as the user you run Zope under. It should print out a list of libs such
> as (the example output is from a 64-bit SuSE system):
> 
>         libdl.so.2 => /lib64/libdl.so.2 (0x0000002a956e0000)
>         libpthread.so.0 => /lib64/tls/libpthread.so.0
> (0x0000002a957e3000)
>         libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a958f8000)
>         /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> (0x000000552aaaa000)
> 

--

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 02 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

Marcos Iuato | 10 Oct 2006 19:10
Picon

Zope stops to respond

I am trying to connect from a linux machine to a MS SQL Server, all the 
installation and configuration seems to be working, but when I run some 
query, the zope stops to respond. Someone knows what I am missing or 
could be wrong?

----------------------
:Packets and versions:
----------------------

debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep odbc
ii  odbcinst1      2.2.4-11       Support library and helper program for 
acces
ii  unixodbc       2.2.4-11       ODBC tools libraries

debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep "MS SQL"
ii  libct1         0.61-6.2       libraries for connecting to MS SQL and 
Sybas
ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
Sybase

Zope Version
(Zope 2.7.9-final, python 2.3.5, linux2)
Python Version	
2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)]

mxODBCZopeDA-1.0.10

---------------
:Configuration:
---------------

debian:/etc# cat /etc/freetds/freetds.conf
[MONET]
        host = 192.168.0.130
        port = 1433
        tds version = 8.0

debian:/etc# cat /etc/odbc.ini
[mssql]
Driver = /usr/lib/odbc/libtdsodbc.so
Description = MS SQL running on monet
Trace = No
Servername = MONET
Database = AfariaDB

eGenix mxODBC Database Connection eGenix mxODBC Database Connection at 
/mssqlserver:

Connection Id  	 mssqlserver  	
Connection Title 		
Database Connection Source 	DSN=mssql 	
ODBC Manager/Driver 	unixODBC 	
Connection Information 	Connected database: SQL Server, unknown version
ODBC driver: libtdsodbc.so, 0.61 	
Database Timezone 	Local Time Zone 	
Connection Options 	

     * Database Warnings are reported as Python exceptions.
     * Connection uses transactions.
     * Time columns are returned as DateTime values.
     * Date/time columns are returned as Zope DateTime values.
     * Short integers are fetched as short integers.
     * NULL values are returned as None.
     * Scale 0 floats are converted to integers.
     * The first available result set is fetched in queries.
     * Don't ignore the max_rows query parameter (this is a Z SQL 
parameter).
	
Connection Pool 	Pool size: 1
Physical connections: 1 open
Total number of mxODBC connections/cursors: (1, 0)
	
Connection State 	connected (since 2006/10/10 12:36:20.323 GMT-3)

-------------------
:Testing with sqsh:
-------------------

debian:/opt/zopes/279-mxodbczopeda# sqsh -D AfariaDB -U samurai -S 
192.168.0.130
sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
Password:
1> select count(*) from a_class
2> go

  -----------
           85

(1 row affected)

Thanks in advance,
Marcos Iuato

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

Marcos Iuato | 10 Oct 2006 20:09
Picon

Re: Zope stops to respond

Enabling the log of freetds, i get:

2006-10-10 15:01:24.390802 processing result tokens.  marker is  fd(DONE)
2006-10-10 15:01:24.390839 inside tds_process_end() more_results = 0, 
was_cancelled = 0
2006-10-10 15:01:24.390883 inside tds_process_result_tokens() state is 
COMPLETED
SQLGetFunctions: fFunction is 999
odbc: not implemented: SQLGetInfo: option/type 10000(SQL_XOPEN_CLI_YEAR) 
[category Added for ODBC 3.x]
odbc: not implemented: SQLGetInfo: option/type 
81(SQL_GETDATA_EXTENSIONS) [category Driver Information]

Does it means that I can't use freetds to connect to an MS SQL Server 2000?

Marcos Iuato escreveu:
> I am trying to connect from a linux machine to a MS SQL Server, all the 
> installation and configuration seems to be working, but when I run some 
> query, the zope stops to respond. Someone knows what I am missing or 
> could be wrong?
> 
> ----------------------
> :Packets and versions:
> ----------------------
> 
> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep odbc
> ii  odbcinst1      2.2.4-11       Support library and helper program for 
> acces
> ii  unixodbc       2.2.4-11       ODBC tools libraries
> 
> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep "MS SQL"
> ii  libct1         0.61-6.2       libraries for connecting to MS SQL and 
> Sybas
> ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
> Sybase
> 
> Zope Version
> (Zope 2.7.9-final, python 2.3.5, linux2)
> Python Version   
> 2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)]
> 
> mxODBCZopeDA-1.0.10
> 
> ---------------
> :Configuration:
> ---------------
> 
> debian:/etc# cat /etc/freetds/freetds.conf
> [MONET]
>        host = 192.168.0.130
>        port = 1433
>        tds version = 8.0
> 
> debian:/etc# cat /etc/odbc.ini
> [mssql]
> Driver = /usr/lib/odbc/libtdsodbc.so
> Description = MS SQL running on monet
> Trace = No
> Servername = MONET
> Database = AfariaDB
> 
> 
> eGenix mxODBC Database Connection eGenix mxODBC Database Connection at 
> /mssqlserver:
> 
> Connection Id       mssqlserver     
> Connection Title        
> Database Connection Source     DSN=mssql    
> ODBC Manager/Driver     unixODBC    
> Connection Information     Connected database: SQL Server, unknown version
> ODBC driver: libtdsodbc.so, 0.61    
> Database Timezone     Local Time Zone    
> Connection Options    
> 
>     * Database Warnings are reported as Python exceptions.
>     * Connection uses transactions.
>     * Time columns are returned as DateTime values.
>     * Date/time columns are returned as Zope DateTime values.
>     * Short integers are fetched as short integers.
>     * NULL values are returned as None.
>     * Scale 0 floats are converted to integers.
>     * The first available result set is fetched in queries.
>     * Don't ignore the max_rows query parameter (this is a Z SQL 
> parameter).
>     
> Connection Pool     Pool size: 1
> Physical connections: 1 open
> Total number of mxODBC connections/cursors: (1, 0)
>     
> Connection State     connected (since 2006/10/10 12:36:20.323 GMT-3)
> 
> -------------------
> :Testing with sqsh:
> -------------------
> 
> debian:/opt/zopes/279-mxodbczopeda# sqsh -D AfariaDB -U samurai -S 
> 192.168.0.130
> sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
> This is free software with ABSOLUTELY NO WARRANTY
> For more information type '\warranty'
> Password:
> 1> select count(*) from a_class
> 2> go
> 
>  -----------
>           85
> 
> (1 row affected)
> 
> 
> Thanks in advance,
> Marcos Iuato
> 
> 
> _______________________________________________________________________
> eGenix.com User Mailing List                     http://www.egenix.com/
> https://www.egenix.com/mailman/listinfo/egenix-users

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

BALTUS Jean | 11 Oct 2006 11:13
Picon
Favicon

RE: Zope stops to respond

Hi, 

Install the development package for freetds (and unix-odbc-bin?):

apt-get -V install unixodbc
apt-get -V install unixodbc-bin
apt-get -V install freetds-dev

Also, in the freetds.conf file, you can add: 

client charset = strip high-order byte 

Try to create a odbcinst.ini file : 

[FreeTDS]
Description		= TDS driver (Sybase/MS SQL)
Driver		= /usr/lib/odbc/libtdsodbc.so
Setup			= /usr/lib/odbc/libtdsS.so
CPTimeout		= 
CPReuse		= 
FileUsage		= 1

And in your odbc.ini file, use the 'FreeTDS' entry that you created in
odbcinst.ini :

[mssql]
Driver = FreeTDS
Description = MS SQL running on monet
Trace = No
Servername = MONET
Database = AfariaDB

On our Debian server, it did the trick...

-- Jean Baltus

-----Original Message-----
From: egenix-users-bounces@...
[mailto:egenix-users-bounces@...] On Behalf Of Marcos Iuato
Sent: mardi 10 octobre 2006 19:10
To: egenix-users@...
Subject: [egenix-users] Zope stops to respond

I am trying to connect from a linux machine to a MS SQL Server, all the 
installation and configuration seems to be working, but when I run some 
query, the zope stops to respond. Someone knows what I am missing or 
could be wrong?

----------------------
:Packets and versions:
----------------------

debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep odbc
ii  odbcinst1      2.2.4-11       Support library and helper program for

acces
ii  unixodbc       2.2.4-11       ODBC tools libraries

debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep "MS SQL"
ii  libct1         0.61-6.2       libraries for connecting to MS SQL and

Sybas
ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
Sybase

Zope Version
(Zope 2.7.9-final, python 2.3.5, linux2)
Python Version	
2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)]

mxODBCZopeDA-1.0.10

---------------
:Configuration:
---------------

debian:/etc# cat /etc/freetds/freetds.conf
[MONET]
        host = 192.168.0.130
        port = 1433
        tds version = 8.0

debian:/etc# cat /etc/odbc.ini
[mssql]
Driver = /usr/lib/odbc/libtdsodbc.so
Description = MS SQL running on monet
Trace = No
Servername = MONET
Database = AfariaDB

eGenix mxODBC Database Connection eGenix mxODBC Database Connection at 
/mssqlserver:

Connection Id  	 mssqlserver  	
Connection Title 		
Database Connection Source 	DSN=mssql 	
ODBC Manager/Driver 	unixODBC 	
Connection Information 	Connected database: SQL Server, unknown version
ODBC driver: libtdsodbc.so, 0.61 	
Database Timezone 	Local Time Zone 	
Connection Options 	

     * Database Warnings are reported as Python exceptions.
     * Connection uses transactions.
     * Time columns are returned as DateTime values.
     * Date/time columns are returned as Zope DateTime values.
     * Short integers are fetched as short integers.
     * NULL values are returned as None.
     * Scale 0 floats are converted to integers.
     * The first available result set is fetched in queries.
     * Don't ignore the max_rows query parameter (this is a Z SQL 
parameter).
	
Connection Pool 	Pool size: 1
Physical connections: 1 open
Total number of mxODBC connections/cursors: (1, 0)
	
Connection State 	connected (since 2006/10/10 12:36:20.323 GMT-3)

-------------------
:Testing with sqsh:
-------------------

debian:/opt/zopes/279-mxodbczopeda# sqsh -D AfariaDB -U samurai -S 
192.168.0.130
sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
Password:
1> select count(*) from a_class
2> go

  -----------
           85

(1 row affected)

Thanks in advance,
Marcos Iuato

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
###########################################

This message has been scanned by ICT - Africa Museum

________________________________________
11/10/2006 - Filtered through antispam by ICT

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

Marcos Iuato | 11 Oct 2006 14:59
Picon

Re: Zope stops to respond

Hi Jean,

I have installed the unixodbc-bin and freetds-dev, and made the 
configurations changes that you suggested, but it still not working. How 
can I debug that problem? Could somebody points some directions?

debian:/etc# dpkg -l|grep MS
ii  freetds-dev    0.61-6.2       MS SQL and Sybase client library 
(static lib
ii  libct1         0.61-6.2       libraries for connecting to MS SQL and 
Sybas
ii  libsybdb3      0.61-6.2       libraries for connecting to MS SQL and 
Sybas
ii  mtools         3.9.9-2.1      Tools for manipulating MSDOS files
ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
Sybase

debian:/etc# dpkg -l|grep odbc
ii  gtkodbcconfig0 2.2.4-11       GTK-based ODBC configuration library
ii  libodbcinstq1  2.2.4-11       Qt-based ODBC configuration library
ii  odbcinst1      2.2.4-11       Support library and helper program for 
acces
ii  unixodbc       2.2.4-11       ODBC tools libraries
ii  unixodbc-bin   2.2.4-11       Graphical tools for ODBC management 
and brow
ii  unixodbc-dev   2.2.4-11       ODBC libraries for UNIX (development 
files)

Thanks in advance,
Marcos Iuato

BALTUS Jean escreveu:
> Hi, 
> 
> Install the development package for freetds (and unix-odbc-bin?):
> 
> apt-get -V install unixodbc
> apt-get -V install unixodbc-bin
> apt-get -V install freetds-dev
> 
> Also, in the freetds.conf file, you can add: 
> 
> client charset = strip high-order byte 
> 
> 
> Try to create a odbcinst.ini file : 
> 
> [FreeTDS]
> Description		= TDS driver (Sybase/MS SQL)
> Driver		= /usr/lib/odbc/libtdsodbc.so
> Setup			= /usr/lib/odbc/libtdsS.so
> CPTimeout		= 
> CPReuse		= 
> FileUsage		= 1
> 
> And in your odbc.ini file, use the 'FreeTDS' entry that you created in
> odbcinst.ini :
> 
> [mssql]
> Driver = FreeTDS
> Description = MS SQL running on monet
> Trace = No
> Servername = MONET
> Database = AfariaDB
> 
> On our Debian server, it did the trick...
> 
> -- Jean Baltus
> 
> 
> -----Original Message-----
> From: egenix-users-bounces@...
> [mailto:egenix-users-bounces@...] On Behalf Of Marcos Iuato
> Sent: mardi 10 octobre 2006 19:10
> To: egenix-users@...
> Subject: [egenix-users] Zope stops to respond
> 
> I am trying to connect from a linux machine to a MS SQL Server, all the 
> installation and configuration seems to be working, but when I run some 
> query, the zope stops to respond. Someone knows what I am missing or 
> could be wrong?
> 
> ----------------------
> :Packets and versions:
> ----------------------
> 
> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep odbc
> ii  odbcinst1      2.2.4-11       Support library and helper program for
> 
> acces
> ii  unixodbc       2.2.4-11       ODBC tools libraries
> 
> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep "MS SQL"
> ii  libct1         0.61-6.2       libraries for connecting to MS SQL and
> 
> Sybas
> ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
> Sybase
> 
> Zope Version
> (Zope 2.7.9-final, python 2.3.5, linux2)
> Python Version	
> 2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)]
> 
> mxODBCZopeDA-1.0.10
> 
> ---------------
> :Configuration:
> ---------------
> 
> debian:/etc# cat /etc/freetds/freetds.conf
> [MONET]
>         host = 192.168.0.130
>         port = 1433
>         tds version = 8.0
> 
> 
> 
> debian:/etc# cat /etc/odbc.ini
> [mssql]
> Driver = /usr/lib/odbc/libtdsodbc.so
> Description = MS SQL running on monet
> Trace = No
> Servername = MONET
> Database = AfariaDB
> 
> 
> eGenix mxODBC Database Connection eGenix mxODBC Database Connection at 
> /mssqlserver:
> 
> Connection Id  	 mssqlserver  	
> Connection Title 		
> Database Connection Source 	DSN=mssql 	
> ODBC Manager/Driver 	unixODBC 	
> Connection Information 	Connected database: SQL Server, unknown version
> ODBC driver: libtdsodbc.so, 0.61 	
> Database Timezone 	Local Time Zone 	
> Connection Options 	
> 
>      * Database Warnings are reported as Python exceptions.
>      * Connection uses transactions.
>      * Time columns are returned as DateTime values.
>      * Date/time columns are returned as Zope DateTime values.
>      * Short integers are fetched as short integers.
>      * NULL values are returned as None.
>      * Scale 0 floats are converted to integers.
>      * The first available result set is fetched in queries.
>      * Don't ignore the max_rows query parameter (this is a Z SQL 
> parameter).
> 	
> Connection Pool 	Pool size: 1
> Physical connections: 1 open
> Total number of mxODBC connections/cursors: (1, 0)
> 	
> Connection State 	connected (since 2006/10/10 12:36:20.323 GMT-3)
> 
> -------------------
> :Testing with sqsh:
> -------------------
> 
> debian:/opt/zopes/279-mxodbczopeda# sqsh -D AfariaDB -U samurai -S 
> 192.168.0.130
> sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
> This is free software with ABSOLUTELY NO WARRANTY
> For more information type '\warranty'
> Password:
> 1> select count(*) from a_class
> 2> go
> 
>   -----------
>            85
> 
> (1 row affected)
> 
> 
> Thanks in advance,
> Marcos Iuato
> 
> 
> _______________________________________________________________________
> eGenix.com User Mailing List                     http://www.egenix.com/
> https://www.egenix.com/mailman/listinfo/egenix-users
> ###########################################
> 
> This message has been scanned by ICT - Africa Museum
> 
> ________________________________________
> 11/10/2006 - Filtered through antispam by ICT
> 

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users

Marcos Iuato | 11 Oct 2006 22:21
Picon

Re: Zope stops to respond

Hi,

unixODBC + FreeTDS seems to be working, testing with isql

debian:/etc# isql mssql samurai samurai
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select count(*) from a_class
+------------+
|            |
+------------+
| 85         |
+------------+
1 rows affected
1 rows returned
SQL>

At ZMI the eGenix mxODBC Database Connection connects succesfull to the 
database, but when I run any query, it blocks all threads and zope 
doesnt respond anymore. I don't know where could be the problem, could 
someone give me some directions?

Thanks in advance,
Marcos Iuato

Marcos Iuato escreveu:
> Hi Jean,
> 
> I have installed the unixodbc-bin and freetds-dev, and made the 
> configurations changes that you suggested, but it still not working. How 
> can I debug that problem? Could somebody points some directions?
> 
> debian:/etc# dpkg -l|grep MS
> ii  freetds-dev    0.61-6.2       MS SQL and Sybase client library 
> (static lib
> ii  libct1         0.61-6.2       libraries for connecting to MS SQL and 
> Sybas
> ii  libsybdb3      0.61-6.2       libraries for connecting to MS SQL and 
> Sybas
> ii  mtools         3.9.9-2.1      Tools for manipulating MSDOS files
> ii  sqsh           2.1-6          commandline SQL client for MS SQL and 
> Sybase
> 
> debian:/etc# dpkg -l|grep odbc
> ii  gtkodbcconfig0 2.2.4-11       GTK-based ODBC configuration library
> ii  libodbcinstq1  2.2.4-11       Qt-based ODBC configuration library
> ii  odbcinst1      2.2.4-11       Support library and helper program for 
> acces
> ii  unixodbc       2.2.4-11       ODBC tools libraries
> ii  unixodbc-bin   2.2.4-11       Graphical tools for ODBC management 
> and brow
> ii  unixodbc-dev   2.2.4-11       ODBC libraries for UNIX (development 
> files)
> 
> Thanks in advance,
> Marcos Iuato
> 
> BALTUS Jean escreveu:
> 
>> Hi,
>> Install the development package for freetds (and unix-odbc-bin?):
>>
>> apt-get -V install unixodbc
>> apt-get -V install unixodbc-bin
>> apt-get -V install freetds-dev
>>
>> Also, in the freetds.conf file, you can add:
>> client charset = strip high-order byte
>>
>> Try to create a odbcinst.ini file :
>> [FreeTDS]
>> Description        = TDS driver (Sybase/MS SQL)
>> Driver        = /usr/lib/odbc/libtdsodbc.so
>> Setup            = /usr/lib/odbc/libtdsS.so
>> CPTimeout        = CPReuse        = FileUsage        = 1
>>
>> And in your odbc.ini file, use the 'FreeTDS' entry that you created in
>> odbcinst.ini :
>>
>> [mssql]
>> Driver = FreeTDS
>> Description = MS SQL running on monet
>> Trace = No
>> Servername = MONET
>> Database = AfariaDB
>>
>> On our Debian server, it did the trick...
>>
>> -- Jean Baltus
>>
>>
>> -----Original Message-----
>> From: egenix-users-bounces@...
>> [mailto:egenix-users-bounces@...] On Behalf Of Marcos Iuato
>> Sent: mardi 10 octobre 2006 19:10
>> To: egenix-users@...
>> Subject: [egenix-users] Zope stops to respond
>>
>> I am trying to connect from a linux machine to a MS SQL Server, all 
>> the installation and configuration seems to be working, but when I run 
>> some query, the zope stops to respond. Someone knows what I am missing 
>> or could be wrong?
>>
>> ----------------------
>> :Packets and versions:
>> ----------------------
>>
>> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep odbc
>> ii  odbcinst1      2.2.4-11       Support library and helper program for
>>
>> acces
>> ii  unixodbc       2.2.4-11       ODBC tools libraries
>>
>> debian:/opt/zopes/279-mxodbczopeda# dpkg -l|grep "MS SQL"
>> ii  libct1         0.61-6.2       libraries for connecting to MS SQL and
>>
>> Sybas
>> ii  sqsh           2.1-6          commandline SQL client for MS SQL 
>> and Sybase
>>
>> Zope Version
>> (Zope 2.7.9-final, python 2.3.5, linux2)
>> Python Version   
>> 2.3.5 (#2, Sep 4 2005, 22:01:42) [GCC 3.3.5 (Debian 1:3.3.5-13)]
>>
>> mxODBCZopeDA-1.0.10
>>
>> ---------------
>> :Configuration:
>> ---------------
>>
>> debian:/etc# cat /etc/freetds/freetds.conf
>> [MONET]
>>         host = 192.168.0.130
>>         port = 1433
>>         tds version = 8.0
>>
>>
>>
>> debian:/etc# cat /etc/odbc.ini
>> [mssql]
>> Driver = /usr/lib/odbc/libtdsodbc.so
>> Description = MS SQL running on monet
>> Trace = No
>> Servername = MONET
>> Database = AfariaDB
>>
>>
>> eGenix mxODBC Database Connection eGenix mxODBC Database Connection at 
>> /mssqlserver:
>>
>> Connection Id       mssqlserver     
>> Connection Title        
>> Database Connection Source     DSN=mssql    
>> ODBC Manager/Driver     unixODBC    
>> Connection Information     Connected database: SQL Server, unknown 
>> version
>> ODBC driver: libtdsodbc.so, 0.61    
>> Database Timezone     Local Time Zone    
>> Connection Options    
>>
>>      * Database Warnings are reported as Python exceptions.
>>      * Connection uses transactions.
>>      * Time columns are returned as DateTime values.
>>      * Date/time columns are returned as Zope DateTime values.
>>      * Short integers are fetched as short integers.
>>      * NULL values are returned as None.
>>      * Scale 0 floats are converted to integers.
>>      * The first available result set is fetched in queries.
>>      * Don't ignore the max_rows query parameter (this is a Z SQL 
>> parameter).
>>     
>> Connection Pool     Pool size: 1
>> Physical connections: 1 open
>> Total number of mxODBC connections/cursors: (1, 0)
>>     
>> Connection State     connected (since 2006/10/10 12:36:20.323 GMT-3)
>>
>> -------------------
>> :Testing with sqsh:
>> -------------------
>>
>> debian:/opt/zopes/279-mxodbczopeda# sqsh -D AfariaDB -U samurai -S 
>> 192.168.0.130
>> sqsh-2.1 Copyright (C) 1995-2001 Scott C. Gray
>> This is free software with ABSOLUTELY NO WARRANTY
>> For more information type '\warranty'
>> Password:
>> 1> select count(*) from a_class
>> 2> go
>>
>>   -----------
>>            85
>>
>> (1 row affected)
>>
>>
>> Thanks in advance,
>> Marcos Iuato
>>
>>
>> _______________________________________________________________________
>> eGenix.com User Mailing List                     http://www.egenix.com/
>> https://www.egenix.com/mailman/listinfo/egenix-users
>> ###########################################
>>
>> This message has been scanned by ICT - Africa Museum
>>
>> ________________________________________
>> 11/10/2006 - Filtered through antispam by ICT
>>
> 
> 
> _______________________________________________________________________
> eGenix.com User Mailing List                     http://www.egenix.com/
> https://www.egenix.com/mailman/listinfo/egenix-users

_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users


Gmane