[unixODBC-support] RE: Problems with freetds and unixodbc
bmorton at secureworks.com
Wed Dec 7 17:56:49 GMT 2005
So here's what I've run into in this process. It is not a problem with
setup as much as a problem with usage (I want to make sure everything works
before I make the tutorial). My driver is registered via odbcinst and my
datasource is as well. I can see them both by doing odbcinst -q -s or -d.
Isql connects to my datasource with no problem. However, I cannot connect
to the datasource via php. This is a package called Rlib for php that does
SQLError = [unixODBC][Driver Manager]Data source name not found, and no
default driver specified
Error SQLConnect -1 [[unixODBC][Driver Manager]Data source name not found,
and no default driver specified]
ERROR: Could not connect to ODBC
But the DSN I am using is clearly registered. I know this isn't a php
mailing list, but has anyone seen anything like this before?
From: Stefan Radman [mailto:Stefan.Radman at ctbto.org]
Sent: Wednesday, December 07, 2005 11:34 AM
To: Support for the unixODBC project
Subject: RE: [unixODBC-support] RE: Problems with freetds and unixodbc
Thanks for volunteering to write the HOWTO.
Below you'll find a summary of my findings.
Use it and distill it as you like ;-)
The ODBC-only configuration does not need any FreeTDS configuration files or
It lives and works solely from the configuration found in odbc.ini and
Here is a sample configuration that worked very well for me on Solaris and
Linux with unixODBC 2.2.9 and FreeTDS ODBC driver 0.62.3:
FreeTDS driver entry in odbcinst.ini:
Description=FreeTDS ODBC Driver for Sybase and MS-SQL
DSN entry in odbc.ini:
Description = Test Sybase Database with FreeTDS
Driver = FreeTDS
Server = sybase.example.com
Port = 5050
TDS_Version = 5.0
Database = testdb
unixODBC has two handy tools for adding these entries:
1) the "ODBCConfig" GUI and
2) the "odbcinst" command line tool
for non-interactive processing (e.g. odbcinst -i -d -r)
Valid attributes for use in odbc.ini (or the connection string) can be found
For ODBC-only configurations these are:
Server database server DNS hostname or IP address
Port TCP port the database server is listening
Database databse name on the server
* do NOT use "Servername" in an ODBC-only configuration!
* use of "Server" should be preferred over "Address"
(see http://lists.ibiblio.org/pipermail/freetds/2004q2/016086.html et
A summary of the Q&A regarding "Server","Servername" and "Address" would
help people a great deal.
What I haven't found is a comprehensive reference about the default TCP port
numbers that different versions of Microsoft and Sybase SQL Server
ms-sql-s 1433/tcp Microsoft-SQL-Server
sybase-sqlany 1498/tcp Sybase SQL Any
4100 Sybase ASE SQL Server default
2025 old Sybase ASE SQL Server default??
> -----Original Message-----
> From: unixodbc-support-bounces at easysoft.com
> [mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Brian
> Sent: Wednesday, 07 December, 2005 15:26
> To: 'unixodbc-support at easysoft.com'
> Subject: [unixODBC-support] RE: Problems with freetds and unixodbc
> I read the FreeTDS article I was sent about the three possible
> configuration options for FreeTDS and ODBC. Can anyone shed some
> light on tips for the only ODBC method? I have done pure FreeTDS, and
> also done the config file mix, which is the one documented on
> unixODBC's site. How do I do it with ODBC being the only connection
> method? Once I figure it out, I will write a howto for the site.
> > -----Original Message-----
> > From: Brian Morton
> > Sent: Tuesday, December 06, 2005 10:59 AM
> > To: 'unixodbc-support at easysoft.com'
> > Subject: Problems with freetds and unixodbc
> > I have a Debian 3.1 machine with FreeTDS and unixODBC
> installed. I am
> > able to connect to my MSSQL 2000 server via tsql (which is
> the command
> > line interface for FreeTDS). However, I cannot connect via
> isql or any
> > odbc connect functions in PHP. I have read the HOWTO on this on the
> > unixODBC site, but it has not helped me. Where can I begin to
> > troubleshoot my problems between FreeTDS and unixODBC?
> Thanks for your
> > help in advance.
> > Brian Morton
> > CRM Developer
> > SecureWorks, Inc.
> > 11 Executive Park Drive
> > Atlanta, GA 30329
> > tel (404) 417-3728
> > fax (404) 327-8835
> > www.secureworks.com
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
unixODBC-support mailing list
unixODBC-support at easysoft.com
More information about the unixODBC-support