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: "." <gmoniey AT gmail.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 11:38:56 -0700

Thanks for your reply...but still no look...to try and clean things up a bit
I deleted the freetds.conf, odbc.ini & odbcinst.ini from all directories but
/usr/local/etc, and did the following:

/> export ODBCINI=/usr/local/etc/odbc.ini
/> export ODBCSYSINI=/usr/local/etc
/> export FREETDSCONF=/usr/local/etc/freetds.conf
/> 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


I found that isql can locate the obdc files, because if I enter a dummy dsn
for the isql parameter, it gives me an error along the lines of Data Source
name not found.

So it almost seems like isql cannot find FreeTDS or its conf file.


On Sun, May 17, 2009 at 6:12 AM, Robert Gonzalez <robert AT robert-gonzalez.com
> wrote:

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




Archive powered by MHonArc 2.6.24.

Top of Page