Osql Error No Driver Found For
Contents |
freeTDS in /usr/local/freeTDS and got all the files like odbc.ini, odbcinst.ini and freetds.conf in the path /etci am
Libtdsodbc So Is Not An Executable File
trying to connect with DNS less connection following the instructions from [s1000][unixodbc][freetds][sql server]unable to connect to data source the link www.freetds.org/userguide/dsnless.htm I am getting the error [unixODBC][FreeTDS][SQL Server] Unable to connect to data source
[im002][unixodbc][driver Manager]data Source Name Not Found, And No Default Driver Specified
(SQL-08001) Driver config file odbcinst.ini [FreeTDS] Driver=/usr/local/freetds/lib/libtdsodbc.so Setup=/usr/local/freetds/lib/libtdsodbc.so Threading=0 FileUsage=1 DontDLClose=1 [download] Perl Program #!/usr/bin/perl use strict; use DBI; $dsn = "dbi:ODBC:DRIVER={FreeTDS};Server=$server;database=$database;"; $dbh = DBI->connect("$dsn","$user","$password") or die "\n$DBI::errstr +\n"; [download] Comment on [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001)Select or Download Code Replies are listed 'Best First'. Re: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001) by karlgoethebier (Parson) on Dec 12, 2012 at 10:24UTC FreeTDS comes with some useful tools for debugging. Please take a look at Troubleshooting ODBC connections. Regards, Karl «The Crux of the Biscuit is the Apostrophe» [reply] Re^2: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001) by perlraj (Acolyte) on Dec 12, 2012 at 12:18UTC Hi Thanks a lot My odbc.ini [SQLServer] Driver=/usr/local/freetds/lib/libtdsodbc.so Description=SQL Server DSN created during installation Server=10.101.11.87 Port=1433 User= Password= Language= Database= Logging=0 LogFile= QuotedId=Yes AnsiNPW=Yes Mars_Connection=No [download] But I am getting the error when i execute the command $ osql -S servername -U username -P password checking shared odbc libraries linked to isql for default directories. +.. trying /usr ... no trying /loc ... no trying /tmp/sql.log ... no trying /home ... no trying /.odbc.ini ... no trying /usr/local/etc ... OK checking odbc.ini files reading /home/perlzuser/.odbc.ini [10.101.11.87] not found in /home/perlzuser/.odbc.ini reading /usr/local/etc/odbc.ini [10.101.11.87] found in /usr/local/etc/odbc.ini found this section: looking for driver for DSN [10.101.11.87] in /usr/local/etc/odbc.ini no driver mentioned for [10.101.11.87] in odbc.ini looking for driver for DSN [default] in /usr/local/etc/odbc.ini osql: error: no driver found for [10.101.11.87] in odbc.ini [download] [reply][d/l][select] Re^3: [unixODBC][FreeTDS]
to connect to MSSQL server ends with error ( Unable to open socket There was a problem connecting to the server ) Next message: [freetds] freetds failed to connect to MSSQL server ends with error ( Unable to open socket There was a problem connecting to the server ) Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] I read all what is already http://www.perlmonks.org/bare/?node_id=1008467 suggssted here : http://lists.ibiblio.org/pipermail/freetds/2009q3/024997.html I do know much about freetds so any help is welcome. Bellow are outputs of proposed step on link above. I have also debian+freetds 0.8.2 but I cannot connect to MSSQL server using isql or tsql . Suggestions are welcome. Thank you. When I run ./tsql -C Compile-time settings (established with http://lists.ibiblio.org/pipermail/freetds/2009q3/025094.html the "configure" script) Version: freetds v0.82 freetds.conf directory: /usr/local/etc MS db-lib source compatibility: no Sybase binary compatibility: no Thread safety: yes iconv library: yes TDS version: 8.0 iODBC: no unixodbc: yes TDSDUMPCONFIG=stderr TDSDUMP=stderr sh -x ./osql -S mssql -U user -P password (where osql is script recommended at http://lists.ibiblio.org/pipermail/freetds/2009q3/024997.html ) last lines in output are : + echo '[mssql]' found in '"/root/.odbc.ini"' [mssql] found in "/root/.odbc.ini" + ODBC_INI=/root/.odbc.ini + break + '[' -z /root/.odbc.ini ']' + echo found this section: found this section: + SED_CMD='/^\[mssql\]/,/^[[:space:]]*$/ { s/^/ /; p; }' + sed -ne '/^\[mssql\]/,/^[[:space:]]*$/ { s/^/ /; p; }' /root/.odbc.ini [mssql] Driver = mssql #Driver =/usr/lib/odbc/libtdsodbc.so Description = MSSQL server Trace = Yes Server = mssql Port = 1433 #UID = [admin] #PWD = [pass] #LogonUser = [admin] #LogonAuth = [pass] TDS_Version=8.0 + for D in '"${DSN}"' ''\''default'\''' + echo 'looking for driver for DSN [mssql]' looking for driver for DSN [mssql] + grep mssql /root/.odbc.ini + '[' 0 -eq 0 ']' + CMD='/^\[ms
compiles and installs without trouble, how do you know if your ODBC setup works? Or, if you know it doesn't, what then?
First, try to connect with tsql. If you're intending to use freetds.conf, exercise it http://www.freetds.org/userguide/odbcdiagnose.htm with tsql -S servername. If not, use TDSVER=7.0 tsql -H hostname -p portIf tsql works and isql doesn't, you've isolated the problem to http://marc.info/?l=freetds&m=130461790829713 the ODBC setup. FreeTDS might have some interoperability problems, but mere connection to the database isn't one of them! If tsql doesn't work, turn on logging with TDSDUMP. The log data source will tell you what TCP/IP name (and address) FreeTDS is attempting to connect to, and what version of the TDS protocol it's using.With iODBC iODBC comes with a sample command line query program called odbctest, located in the iodbc/samples directory. Using this program you can get a listing of DSNs, connect, and issue queries. For debugging purposes, you may osql error no wish to link a program such as odbctest directly to FreeTDS instead of to the driver manager. [1] To do so, compile and install the ODBC driver with iODBC as normal [2], then compile and link the program: Example 4-7. Compile odbctest without a driver manager. $ make odbctest.o $ gcc -g -o odbctest odbctest.o /usr/local/freetds/lib/libtdsodbc.a