Note to self: enabling debug output for unixodbc is easy once you put the configuration lines in the right place – /etc/odbcinst.ini:
[ODBC] Trace = Yes TraceFile = /tmp/sql.log
Putting them into odbc.ini, as shown eg. here, does not work (at least not in Lucid Lynx).