[unixODBC-support] Web OK, command-line.. not yet!

Nick Gorham nick at lurcher.org
Mon Jul 7 16:56:22 BST 2014

On 07/07/14 16:50, Jean-Roch Grenetier wrote:
> Hello,
> It's probably a simple one, I think the visibility of .odbc.ini
> - everything works from Web requests on our Apache-Modperl server. It 
> knows where to find /web/.odbc.ini
> - but from the command-line calling the same modperl program than the 
> Web request do, I've got an 'Unknown host machine name'. I've copied 
> .odbc.ini pretty much everywhere, so that it be visible to this 
> command-line user. Hint: all other classical Perl DBI connections work 
> from both Web requests and command-line.
> DBI connect('db_one','optimus',...) failed: [unixODBC][FreeTDS][SQL 
> Server]Unable to connect to data source (SQL-08001) [state was 08001 
> now 01000]
> [unixODBC][FreeTDS][SQL Server]Unknown host machine name. (SQL-01000)

Try setting ODBCINI to the ini file you want to use.

TBH, I think the above shows the problem is in the driver, as unixODBC 
is loading the driver and it looks like the drive is failing to load the 
value from the ini file. If unixODBC was failing to load the info from 
the ini it would have failed to load the driver.

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

More information about the unixODBC-support mailing list