Re: Problems Connecting Debian --> MSSQL through odbc

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, Jul 28, 2009 at 05:13:54PM +0200, Jaap van Arragon wrote:
> 
> In the script it says that its finding the driver but at the end the driver
> cannot be found?

Take away the sh -x output and perhaps it's clearer: 

>   found driver line: "    Driver        = /usr/lib/odbc/libtdsodbc.so"
>   found driver /usr/lib/odbc/libtdsodbc.so for [FreeTDS] in odbcinst.ini
> /usr/lib/odbc/libtdsodbc.so is not an executable file
> osqlscript.sh: error: no driver found for SBGROEP


Maybe "found" isn't quite right; it means it found that string in the file, not the file in the filesystem.  That is, 

>   found driver /usr/lib/odbc/libtdsodbc.so for [FreeTDS] in odbcinst.ini

means odbcinst.ini has a section [FreeTDS] with a Driver line, i.e.: 

	Driver        = /usr/lib/odbc/libtdsodbc.so

and osql successfully parsed the line for the right-hand argument.  

Now, just because that line exists in odbcinst.ini, it doesn't mean there's a file by that name on the disk.  Or, if it does exist, that it's executable for the user running the process.  What does

	ls -l /usr/lib/odbc/libtdsodbc.so*

report?  It should both exist and executable, e.g.:

$ ls -l /usr/lib64/libsybdb.so* | awk '{print $1,$9}' 
lrwxrwxrwx  /usr/lib64/libsybdb.so
lrwxrwxrwx  /usr/lib64/libsybdb.so.5
-rwxr-xr-x  /usr/lib64/libsybdb.so.5.0.0

$ for F in  /usr/lib64/libsybdb.so*; do if [ -x $F ]; then echo executable: $F; fi; done
executable: /usr/lib64/libsybdb.so
executable: /usr/lib64/libsybdb.so.5
executable: /usr/lib64/libsybdb.so.5.0.0

HTH.

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.