Communicating with a MS SQL database from a Linux server
Posted: Sat Aug 21, 2010 2:39 pm
I am trying to communicate with a MS SQL database from a Linux server. I can use isql in the terminal and run any query successfully. In php I can use odbc_tables and odbc_columns and get all the table and column names in the database. Whenever I try to use odbc_exec to run queries the program never returns and just sits there waiting without returning any error message. What could possibly be causing this problem? Any ideas on how I can debug this?
The database is: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 6.0 (Build 6002: Service Pack 2)
Here are my config files on the linux server...
freetds.conf
odbcinst.ini
odbc.ini
The database is: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 6.0 (Build 6002: Service Pack 2)
Here are my config files on the linux server...
freetds.conf
Code: Select all
[MSSERVER]
host = <ip address>
port = 49933
tds version = 7.0
Code: Select all
[TDS]
Description = FreeTDS driver
Driver = /user/lib64/libtdsodbc.so
Setup = /user/lib64/libtdsodbc.so
Fileusage = 1
Code: Select all
Driver = TDS
Description = MS Server
Servername = MSSERVER
Database = <database name>
Port = 49933