On August 23, 2012 10:09 , "Tilsley, Jerry M." <jmtils...@st-claire.org> wrote:
Has anyone successfully used FreeTDS with RHEL 6.x? I’m having trouble getting it to work. Works great on RHEL 5.7, but neither of my RHEL 6.x servers will work with it.

I'm successfully using FreeTDS on two RHEL 6.3 systems to connect to a Microsoft SQL Server database via ODBC.

I followed the instructions for setting up PHP PDO, ODBC, and FreeTDS to connect to MSSQL that are at http://www.php.net/manual/en/ref.pdo-odbc.php#98716

Additional useful information is at http://lucasmanual.com/mywiki/unixODBC

I enabled the EPEL repository on my systems and then ran "yum install freetds".

I created a tds.driver file containing:

[FreeTDS]
Description = FreeTDS v0.91
Driver64 = /usr/lib64/libtdsodbc.so.0
Setup64 = /usr/lib64/libtdsS.so

I created a tds.datasource file containing:

[MY-DATABASE-TAG]
Driver=FreeTDS
Description=My Database Description
Trace=No
Server=mydatabase-server-fqdn.example.com
Port=1433
TDS Version=7.1
Database=my_database_name

I then ran:

odbcinst -i -d -f tds.driver
odbcinst -i -s -l -f tds.datasource

At this point, I edited the files /etc/freetds.conf, /etc/odbcinst.ini, /etc/odbc.ini and made sure everything was correct. IMPORTANT: /etc/odbc.ini must have NO LEADING SPACES on any line, regardless of what you may see in examples in documentation.

In /etc/freetds.conf, I have:

[my-server-tag]
host = mydatabase-server-fqdn.example.com
port = 1433
tds version = 7.1

In /etc/odbc.ini I have the same stanza as in tds.datasource

At this point, I was able to successfully test everything using both of these commands:

osql -S MY-DATABASE-TAG -U 'my-ad-domain\my-username' -P 'password-goes-here' -I /etc

isql -v MY-DATABASE-TAF 'my-ad-domain\myusername 'password-goes-here'


I hope this helps.

--
  Mark Montague
  LSA Research Systems Group
  University of Michigan
  markm...@umich.edu

_______________________________________________
rhelv6-list mailing list
rhelv6-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv6-list

Reply via email to