[freetds] tsql works fine, but isql fails (OS X)

. gmoniey at gmail.com
Sat May 16 21:38:37 EDT 2009


I am trying to get ruby to talk to SQL Server through DBI, but I am stuck
because I cant seem to get odbc to work correctly.

FreeTDS is working, as I can do the following:

/> tsql -S MyDSN -U Username


But when I try isql, I get the following:

/> isql -v MyDSN
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
[ISQL]ERROR: Could not SQLConnect

Here is what my ini files look like:

/> cat /usr/local/etc/freetds.conf

[global]
        # TDS protocol version
;    tds version = 4.2

    # Whether to write a TDSDUMP file for diagnostic purposes
    # (setting this to /tmp is insecure on a multi-user system)
;    dump file = /tmp/freetds.log
;    debug flags = 0xffff

    # Command and connection timeouts
;    timeout = 10
;    connect timeout = 10

    # If you get out-of-memory errors, it may mean that your client
    # is trying to allocate a huge buffer for a TEXT field.
    # Try setting 'text size' to a more reasonable limit
    text size = 64512


    # A typical Microsoft server
[MyDB]
    host = 100.xx.xx.xx
    port = 1433
    tds version = 7.0
    client charset = UTF-8


/> cat /usr/local/etc/odbcinst.ini
[FreeTDS]
Description        = ODBC Connection via FreeTDS
Driver            = /usr/local/lib/libtdsodbc.so
FileUsage        = 1
UsageCount        = 2


/> cat /usr/local/etc/odbc.ini
[MyDSN]
Driver            = /usr/local/lib/libtdsodbc.so
Description     = ODBC Connection via FreeTDS
Trace           = No
Servername      = MyDB
Database        = DBName
TDS Version     = 8.0

Any help would be appreciated as I am pulling my hair out over this as I
havent made any progress in days.

Thanks



More information about the FreeTDS mailing list