[unixODBC-support] odbc question from a noob

Tschida,Joshua Joshua_Tschida at securecomputing.com
Thu Oct 18 15:42:11 BST 2007

Greetings unixodbc support list.  I'm a new member here with a bit of a
problem and I am nearly out of ideas.    


I have a handful of Solaris 9 servers here configured with FreeTDS and
UnixODBC.  We use some Perl scripts to connect back to various MS SQL
servers using ODBC connections through these packages.   Everything
currently setup works great, but I am trying to create a new DSN and am
failing miserably.  I know we have made changes to our odbc.ini and
freetds.conf files in the past and been successful, so I'm not sure what the
deal is here.


Both my odbc.ini and freetds.conf are located in /usr/local/etc.  We do not
have any duplicates anywhere else on the server.

I have attempted to edit them both manually, as well as with odbcinst.  The
changes appear to be identical.

My new DSN is a nearly exact duplicate of a known working DSN, simply
changing the database it connects to.  



My perl script is run from the command line, and returns the following


DBI connect('dsnname','uername',...) failed: [unixODBC][FreeTDS][SQL
Server]Unable to connect to data source (SQL-08001)(DBD: db_login/SQLConnect
err=-1) at ./script.pl line 110

cannot connect:  at ./mi_flush_db.pl line 110.



To troubleshoot, I've tried using tsql and isql both.  Tsql connects great
when I enter the hostname of the database server as well as the same
credentials that I use with my script.  Isql fails though when using the dsn
name.  I have also been listening to traffic going to the database server
with snoop, and nothing is sent out when my failures occur, so I know it's
not the database server responding poorly.


isql -v dsnname username password

[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source

[ISQL]ERROR: Could not SQLConnect





Hopefully I haven't left out any important details above.  I'm really at a
loss for what I am missing here.  I've poured over a lot of various forum
threads and mailing list posts that Google returned and nothing has really
helped resolve this.  Though I have seen some similar cases, but the
submitters never really replied back with a solid answer to what fixed it
for them.   :-(


Thanks for any assistance.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20071018/b4d9b01b/attachment.html>

More information about the unixODBC-support mailing list