[unixODBC-support] FreeTDS, unixODBC, GENTOO and DBD::ODBC

Nick Gorham nick at lurcher.org
Tue Jun 2 17:37:23 BST 2009


Michael Higgins wrote:
> Following this guide:
>
> http://www.freetds.org/userguide/odbcinionly.htm
> "An ODBC-only configuration relies solely on odbc.ini for server properties."
>
>
> [This is what is expected, then, right?]
>
> Checking with this:
>
> strace perl odbctest.pl 2>&1 |grep odbc
>
> execve("/usr/bin/perl", ["perl", "odbctest.pl"], [/* 47 vars */]) = 0
> open("odbctest.pl", O_RDONLY|O_LARGEFILE) = 3
> open("/usr/lib/libodbc.so.1", O_RDONLY) = 3
> open("/etc/unixODBC/odbcinst.ini", O_RDONLY) = 3
> access("/etc/unixODBC/odbc.ini", F_OK)  = 0
> stat64("/etc/unixODBC/odbc.ini", {st_mode=S_IFREG|0644, st_size=365, ...}) = 0
> open("/etc/unixODBC/odbcinst.ini", O_RDONLY) = 3
>
> Why is it trying to open odbcinst.ini, then?
>   
I can't speak for DBD::ODBC, GEBTOO and FreeTDS, but unixodbc will read 
odbcinst.ini at least to see if its got tracing turned on.

Other than that, from the connection string

my $DSN="Server=127.0.0.1;Port=1799;Database=THEDB;UID=THEUSER;PWD=THEPWD";

As there is no DRIVER= entry, the driver manager must (and can only) try 
loading the default first DSN in the odbc.ini and then passing control 
to whatever driver that references. After that I don't know, and can't say.

-- 
Nick



More information about the unixODBC-support mailing list