Open Database Connectivity

From ArchWiki
Revision as of 10:15, 21 February 2015 by Fengchao (talk | contribs) (Merge from Odbc.)
Jump to navigation Jump to search

Open Database Connectivity, commonly ODBC, is an open specification for providing application developers with a predictable API with which to access Data Sources

This document shows how to set up unixODBC in Arch, first to access your database on your localhost and then extends the steps to configure MySQL to allow remote access through ODBC.

An ODBC engine needs drivers to be able to interact with databases.

ODBC engines

You have two options to chose from. Apparently unixODBC is more widely supported.



# pacman -S unixodbc


At /etc/odbcinst.ini is where drivers are declared, and /etc/odbc.ini where connections. More instruction at each driver section.





FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases. Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients.


pacman -S freetds



Driver          = /usr/lib/ 
UsageCount      = 1 


Microsoft SQL Server 2000


Driver      = FreeTDS
#Trace       = Yes
#TraceFile   = /tmp/odbc
Servername  = server_name
Database    = database_name


host = # Host name or IP address.
port = 1433 # Default port.
tds version = 7.1
client charset = UTF-8