Friday, 8 February 2013

Open Database Connectivity

Stub. Lacks good formatting. Intended as more organized and general than the ''Odbc article''.


New page






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.



===unixODBC===



====Installation====

# pacman -S unixodbc



====Configuration====



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



===iODBC===



...



==Drivers==



===FreeTDS===



'''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.



====Installation====



pacman -S freetds



====Configuration====



/etc/odbcinst.ini



[FreeTDS]

Driver = /usr/lib/libtdsodbc.so

UsageCount = 1



==Databases==



===Microsoft SQL Server 2000===



/etc/odbc.ini

[server_name]

Driver = FreeTDS

#Trace = Yes

#TraceFile = /tmp/odbc

Servername = server_name

Database = database_name



/etc/freetds/freetds.conf

[server_name]

host = 192.168.0.2 # Host name or IP address.

port = 1433 # Default port.

tds version = 7.1

client charset = UTF-8

No comments:

Post a Comment