Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Robert Gonzalez <robert AT robert-gonzalez.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tsql works fine, but isql fails (OS X)
  • Date: Sun, 17 May 2009 07:12:19 -0600

When I ran into this trying to connect PHP to SQL Server on Ubuntu 8.10 it
was because the environment var FREETDSCONF was not properly exported so the
server did not know where to find the conf file.

http://www.robert-gonzalez.com/2009/02/18/building-the-php-ms-sql-server-extension-from-source-on-ubuntu-810/

Scroll down a little bit on the page to the link till you get to the part
about exporting environment vars. That describes what I did to get rid of
that issue.

On Sat, May 16, 2009 at 7:38 PM, . <gmoniey AT gmail.com> wrote:

> 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



--

Robert Gonzalez
http://www.robert-gonzalez.com




Archive powered by MHonArc 2.6.24.

Top of Page