User Tools

Site Tools


general:linux:unixodbc

unixODBC

FreeTDS

Install tdsodbc, unixodbc, odbcinst

Install driver to /etc/odbcinst.ini

# odbcinst -i -d -f /usr/share/tdsodbc/odbcinst.ini
odbcinst: Driver installed. Usage count increased to 1. 
    Target directory is /etc
root@web:~# odbcinst -i -s -l -r << EOF
[DSNName]
Driver          = FreeTDS
Description     = Describe connection
Server          = hostname_of_server
Database        = Database_Name
Port            = 1433
TDS_Version     = 7.3
ClientCharset   = UTF-8
EOF
odbcinst: Sections and Entries from stdin have been added to ODBC.INI

Tracing

A trace log can be created by adding this to /etc/odbcinst.ini

[ODBC]
Trace      = Yes
Trace File = /tmp/sql.log

Or by setting DumpFile in /etc/odbc.ini

[THE_DSN_NAME]
...
DumpFile=/tmp/sqldump.log

Connection pooling

Connection pooling can be turned on by adding Pooling=Yes and CPTimeout > 0 in /etc/odbcinst.ini

[ODBC]
...
Pooling    = Yes

[FreeTDS]
...
CPTimeout=120

More FreeTDS settings

general/linux/unixodbc.txt · Last modified: 2022/04/11 10:05 by