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

Mike barjunk at attglobal.net
Wed Jul 9 21:49:36 BST 2014


Nick,

I know you fixed this, but could it be the problem with the format of  
the ini file is "wrong"?

Don't remember the exact details, but something to do with where the  
brackets for each section are in the line or spacing of some  
sort...I'll have to dig through my archives to try and find what we  
ended up doing to fix that issue.

Mike B.
Quoting Nick Gorham <nick at lurcher.org>:

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




More information about the unixODBC-support mailing list