[unixODBC-support] odbc question from a noob

Tschida,Joshua Joshua_Tschida at securecomputing.com
Wed Oct 24 17:16:59 BST 2007


I'd just like to reply back quick and thank the folks that replied to my
issues with unixodbc.  We resolved the issue...  I'm embarrassed to say that
two of us failed to realize that "servename" is not the same as "servername"
in the odbc.ini for my new dsn I was trying to get working...  once we made
the appropriate spelling change it worked fine...

 

Oh well, at least I got a good lesson in how unixodbc and freetds work.   

 

-Josh

 

 

________________________________

From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Stein, Howard
Sent: Thursday, October 18, 2007 10:20 AM
To: Support for the unixODBC project
Subject: RE: [unixODBC-support] odbc question from a noob

 

try odbcinst -j and make sure your using the correct ini files.  If your
version of odbcinst does not support -j then go into the ini file you think
is the correct one and change the "good dsn name" to something different.
Then try connecting with the new dsn name.  If you get an error you are in
the wrong ini file most likely.

	 

	
________________________________


	From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Tschida,Joshua
	Sent: Thursday, October 18, 2007 10:42 AM
	To: unixodbc-support at easysoft.com
	Subject: [unixODBC-support] odbc question from a noob

	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 output.

	 

	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.

	-Josh

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


More information about the unixODBC-support mailing list