This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13762|Reply: 0

[Communication] Configure Python to access SQLSserver under Redhat

[Copy link]
Posted on 11/26/2014 3:12:27 PM | | | |

It is not easy to move the database under WINDOWS to LINUX to be accessed
Encountered N strange errors in the middle
The experience of failure is recalled as follows:
Use yum install freetds*
yum installunixODbc*
The components installed by this method seem unreliable
I got hand-loaded
There are also 64-bit machines that don't have the same location as the one mentioned in the official readme.1st. (I'm going!) )

Here are some steps copied from history (slightly sorted out)

cd freetds-0.91/
./configure --prefix=/etc/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
make
make install
tsql -S172.16.1.10 -U testdba -P ak51ak
vi /usr/local/freetds/etc/freetds.conf

wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz
tar zxvf unixODBC-2.3.1.tar
cd unixODBC-2.3.1
ll
./configure
make
make install
odbcinst -j


wget http://pyodbc.googlecode.com/files/pyodbc-3.0.6.zip
unzip pyodbc-3.0.6.zip
cd pyodbc-3.0.6
python setup.py build
python setup.py install


vi /etc/odbcinst.ini
ls /usr/lib64/libtdsodbc.so.0
cd /usr/lib64
ll libtds*
vim /etc/odbc.ini
vi /etc/odbcinst.ini

[SQL Server]
Description = FreeTDS ODBC driver for MSSQL
Driver = /usr/lib64/libtdsodbc.so.0
Setup = /usr/lib64/libtdsS.so.0
FileUsage = 1






Previous:SQL Server user connections cap issue
Next:People who have not installed sqlserver2008r2 on Windows 2003 are unexpectedly difficult
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com