in reply to Re^2: Perl, DBD and SQL Server 2008 (R2)
in thread Perl, DBD and SQL Server 2008 (R2)

DBI's available_drivers only lists available DBDs e.g., DBD::ODBC, DBD::Pg (the DBDs installed on your machine not ODBC drivers). If you are using DBD::ODBC the DBI method data_sources returns valid ODBC data sources (which I think you are looking for) and this info comes from the ODBC Driver manager and the SQLDataSources ODBC call. This is usually a list of data sources in one or more odbc.ini files. The odbcinst.ini file (if using unixODBC) lists available ODBC drivers on your machine - see the links I gave before - they explain all this.

  • Comment on Re^3: Perl, DBD and SQL Server 2008 (R2)

Replies are listed 'Best First'.
Re^4: Perl, DBD and SQL Server 2008 (R2)
by Anonymous Monk on Mar 24, 2011 at 23:44 UTC
    I use freetds/unixodbc on a hp-ux platform. I find perl scripts looks in the user home directory (~) for a .odbc.ini file. So, as the user that is executing the script, check ~/.odbc.ini to make sure its there. Hope this helps!