[freetds] [ISQL]ERROR: Could not SQLConnect
jun_chen at bankone.com
jun_chen at bankone.com
Wed May 19 11:09:22 EDT 2004
Hi,
I were trying to setup unixODBC and freetds in Redhat Advanced Server 2.1
to access Sybase and MS SQL Server.
The freetds version is 0.62.3 and unixODBC's is 2.2.8.
I used the following to configure freetds:
./configure --prefix=/usr/local/freetds --disable-threadsafe
--with-tdsver=7.0 --with-unixodbc=/usr/local/unixODBC
After I configured freetds.conf, I can use Perl DBI and Perl DBD::Sybase
to access a Sybase database and
MS SQL Server. I can also use tsql (tsql -S views -U <username> -P
<password> to access those databases without any issue.
I configured odbcinst.ini and odbc.ini by using odbcinst. Here are the
file odbcinst.ini:
[DB2]
Description = DB2 Driver
Driver = /usr/IBMdb2/V7.1/lib/libdb2.so
FileUsage = 1
[TDS]
Description = v0.62
Driver = /usr/local/freetds/lib/libtdsodbc.so
FileUsage = 1
Here is odbc.ini:
[inv]
Description = Tivoli Production Inventory DB2
Driver = DB2
[views]
Description = CSIRT MS SQL Server
Driver = TDS
[peregrine]
Description = Peregrine MS SQL Server
Driver = TDS
[visdb]
Driver = TDS
Description = SAN Point Sybase DB
Trace = No
Servername = 204.151.176.177
Database = visdb
Trace = Yes
TraceFile = visdb.log
UID = DBA
When I run the command isql -v peregrine <username> <password> or isql -v
views <username> <password>,
I always got the following error
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
I tried to compile freetds with --with-tdsver=4.2 and 8.0 and all got the
same error. I also tried to export TDSVER=8 and
export TDSDUMPCONFIG=/var/log/dump.txt. Nothing showed up in the dump
file.
Any ideas? Thank a lot for your help.
Jun
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
More information about the FreeTDS
mailing list