5. Registering the TDS Driver and the SQL Data Source (Vardy) with UnixODBC

UnixODBC needs to know about the TDS driver software. To do this create a text file called, e.g., unixodbc.tds.driver.template with content:

    [TDS]
    Description     = v0.62.1 with protocol v4.2
    Driver          = /usr/local/lib/libtdsodbc.so    # ...adjust path
(libtdsodbc.so is part the FreeTDS installation). Then, as root, run
    root> odbcinst -i -d -f unixodbc.tds.driver.template
    odbcinst: Driver installed...
(odbcinst is part of the UnixODBC installation). This adds some text to /etc/odbcinst.ini (or /usr/local/etc/odbcinst.ini).

Next, an ODBC data source needs to be installed. To do this create a text file called, e.g., unixodbc.tds.datasource.template with content:

    [vardyurs]
    Driver      = TDS
    Description = Testing Vardy
    Trace       = No
    Servername  = vardyurs        # ...NOT IP/hostname, but added 
                                  #    to freetds.conf above
    Port        = 1433
    Database    = reg6-sql
    UID         = <ursusername>
As the user who will be making the ODBC connections
    user> odbcinst -i -s -f unixodbc.tds.datasource.template
which will create (or add to) ~user/.odbc.ini.

...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_sql_server_odbc_py/_reml_grp/index.reml
On: 19/3/2004 at 15:34:33
Options: reml2 -i noindex -l long -o html -p multiple