Skip Menu |

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 130166
Status: new
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: david [...] justatheory.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.60
Fixed in: (no value)



Subject: Default Driver Fails to Load
I've been attempting to configure unixODBC in the Sqitch Snowflake image to use a default driver; since there is only the one in the Docker image, it seems silly to make people specify `Driver=Snowflake` every time. So I rigged up `/etd/odbcinst.ini` with: [Default] Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so [Snowflake] Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so It continues to work to specify `Driver=Snowflake` and also `Driver=Default`, but not when I omit the `Driver` parameter. In that case, I get that most hated of errors: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002) I've been assuming the issue was with my configuration, but in researching it, I came across this issue: https://www.easysoft.com/developer/languages/perl/dbd_odbc_tutorial_part_1.html#misc_dsn_nf So I turned on tracing to see what's going on; it's not much help, sadly: # DBI_TRACE=DBD sqitch status 'db:snowflake://x/y' # On database db:snowflake://x.snowflakecomputing.com/y non-Unicode login6_sv dbd_db_login6 SQLDriverConnect 'Server=x.snowflakecomputing.com;Port=443;Database=y;UID=root', 'root', 'xxxx' SQLDriverConnect failed: !!dbd_error2(err_rc=-1, what=db_login/SQLConnect, handles=(55b0cfdf8790,55b0cfdf8d90,0) !SQLError(55b0cfdf8790,55b0cfdf8d90,0) = (IM002, 0, [unixODBC][Driver Manager]Data source name not found, and no default driver specified) DESTROY for DBI::db=HASH(0x55b0cfdf57b0) ignored - handle not initialised non-Unicode login6_sv dbd_db_login6 SQLDriverConnect 'Server=x.snowflakecomputing.com;Port=443;Database=y;UID=root', 'root', 'xxxx' SQLDriverConnect failed: !!dbd_error2(err_rc=-1, what=db_login/SQLConnect, handles=(55b0cfd66350,55b0cfe00a00,0) !SQLError(55b0cfd66350,55b0cfe00a00,0) = (IM002, 0, [unixODBC][Driver Manager]Data source name not found, and no default driver specified) DESTROY for DBI::db=HASH(0x55b0cfd61848) ignored - handle not initialised [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002) Both return the same error! Is there some way to get either DBD::ODBC or unixODBC to load the default driver?
Additional context in the comments on https://github.com/sqitchers/docker-sqitch/pull/16.