Skip to Content.
Sympa Menu

freetds - Re: [freetds] MS SQL Server access works with tsql but not with isql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brad McNeely" <brad_mcneely AT excite.com>
  • To: brian AT bruns.com, freetds AT lists.ibiblio.org
  • Cc:
  • Subject: Re: [freetds] MS SQL Server access works with tsql but not with isql
  • Date: Mon, 13 Dec 2004 20:46:03 -0500 (EST)


OK. I'm still not there. New error. I get
isql -v mmssql
[IM002][unixODBC][Driver Manager]Data source name not found, and no default
driver specified
with this config
/etc/unixODBC/odbc.ini
[mssql]
Description = TDS
Driver = TDS
Servername = TDS
Database = pubs
UID = bmcneely
PWD =
Port = 1433


/etc/freetds.conf
[TDS]
host = 192.168.1.101
port = 1433
tds version = 7.0



Here's the ODBC trace file:
[ODBC][4144][__handles.c][421]
Exit:[SQL_SUCCESS]
Environment = 0x8052488
[ODBC][4144][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0x8052488
[ODBC][4144][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0x8052c08
[ODBC][4144][SQLConnect.c][3452]
Entry:
Connection = 0x8052c08
Server Name = [mmssql][length = 6 (SQL_NTS)]

User Name = [][length = 0 (SQL_NTS)]
Authentication = [][length = 0 (SQL_NTS)]
[ODBC][4144][SQLConnect.c][3661]Error: IM002
[ODBC][4144][SQLError.c][424]
Entry:
Connection = 0x8052c08
SQLState = 0xbfffeef0
Native = 0xbfffeee8
Message Text = 0xbfffef00
Buffer Length = 500
Text Len Ptr = 0xbfffeeee
[ODBC][4144][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = IM002
Native = 0xbfffeee8 -> 0
Message Text = [[unixODBC][Driver Manager]Data source
name not found, and no default driver specified]
[ODBC][4144][SQLError.c][424]
Entry:
Connection = 0x8052c08
SQLState = 0xbfffeef0
Native = 0xbfffeee8
Message Text = 0xbfffef00
Buffer Length = 500
Text Len Ptr = 0xbfffeeee
[ODBC][4144][SQLError.c][461]
Exit:[SQL_NO_DATA]
[ODBC][4144][SQLError.c][504]
Entry:
Environment = 0x8052488
SQLState = 0xbfffeef0
Native = 0xbfffeee8
Message Text = 0xbfffef00
Buffer Length = 500
Text Len Ptr = 0xbfffeeee
[ODBC][4144][SQLError.c][541]
Exit:[SQL_NO_DATA]
[ODBC][4144][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 0x8052c08
[ODBC][4144][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][4144][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 0x8052488



I feel like i'm getting closer. It was much easier to configure the DB2 ODBC
driver. Thanks.

Regards,
Brad


--- On Mon 12/13, Brian Bruns < brian.bruns AT gmail.com > wrote:
From: Brian Bruns [mailto: brian.bruns AT gmail.com]
To: brad_mcneely AT excite.com, freetds AT lists.ibiblio.org
Date: Mon, 13 Dec 2004 20:02:40 -0500
Subject: Re: [freetds] MS SQL Server access works with tsql but not with isql

in the odbc.ini "Servername" is a reference to the freetds.conf
file,<br>"Server" would be a hostname (or IP as in this case) so either
use<br><br>Servername = TDS <br><br>or <br><br>Server =
192.168.1.101<br><br>but don't mix them. If you use the later (ODBC-only
style) you'll<br>probably want to use TDS_Version in odbc.ini as
well.<br><br>On Mon, 13 Dec 2004 19:33:04 -0500 (EST), Brad
McNeely<br><brad_mcneely AT excite.com> wrote:<br>> <br>> Using the rpms<br>>
freetds-0.62.1-1.i586.rpm<br>> freetds-unixodbc-0.62.1-1.i586.rpm<br>> <br>>
from the freetds web site I'm up and running. I'm able to connect to an
MSSQL Server database using tsql but not isql. Here are my files:<br>>
/etc/unixODBC/odbcinst.ini<br>> [TDS]<br>> Description = TDS
Test<br>> Driver = /usr/lib/libtdsodbc.so<br>> Setup =
/usr/lib/unixODBC/libtdsS.so.1<br>> FileUsage = 1<br>> <br>>
/etc/unixODBC/odbc.ini<br>> [mssql]<br>> Description = TDS<br>>
Driver = TDS<br>> Servername = 192.168.1.101<br>>
Database = pubs<br>> UID = bmcneely<br>> PWD
=<br>> Port = 1433<br>> <br>> /etc/freetds.conf<br>>
[TDS]<br>> host = 192.168.1.101<br>> port = 1433<br>> tds version = 7.0<br>>
<br>> Here's the error:<br>> isql -v mssql bmcneely<br>>
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source<br>>
[ISQL]ERROR: Could not SQLConnect<br>> <br>> and here's the sql.log from the
ODBC trace:<br>> [ODBC][8246][__handles.c][421]<br>>
Exit:[SQL_SUCCESS]<br>> Environment = 0x8052488<br>>
[ODBC][8246][SQLAllocHandle.c][345]<br>> Entry:<br>>
Handle Type = 2<br>> Input Handle =
0x8052488<br>> [ODBC][8246][SQLAllocHandle.c][463]<br>>
Exit:[SQL_SUCCESS]<br>> Output Handle =
0x8052c08<br>> [ODBC][8246][SQLConnect.c][3452]<br>>
Entry:<br>> Connection = 0x8052c08<br>>
Server Name = [mssql][length = 5 (SQL_NTS)]<br>>
User Name = [][length = 0 (SQL_NTS)]<br>>
Authentication = [][length = 0 (SQL_NTS)]<br>> UNICODE Using
encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'<br>> <br>>
DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source<br>> <br>>
[ODBC][8246][SQLConnect.c][3820]<br>> Exit:[SQL_ERROR]<br>>
[ODBC][8246][SQLError.c][424]<br>> Entry:<br>>
Connection = 0x8052c08<br>> SQLState =
0xbfffebe0<br>> Native = 0xbfffebd8<br>>
Message Text = 0xbfffebf0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebde<br>>
[ODBC][8246][SQLError.c][461]<br>> Exit:[SQL_SUCCESS]<br>>
SQLState = S1000<br>> Native =
0xbfffebd8 -> 0<br>> Message Text =
[[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]<br>>
[ODBC][8246][SQLError.c][424]<br>> Entry:<br>>
Connection = 0x8052c08<br>> SQLState =
0xbfffebe0<br>> Native = 0xbfffebd8<br>>
Message Text = 0xbfffebf0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebde<br>>
[ODBC][8246][SQLError.c][461]<br>> Exit:[SQL_NO_DATA]<br>>
[ODBC][8246][SQLError.c][504]<br>> Entry:<br>>
Environment = 0x8052488<br>> SQLState =
0xbfffebe0<br>> Native = 0xbfffebd8<br>>
Message Text = 0xbfffebf0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebde<br>>
[ODBC][8246][SQLError.c][541]<br>> Exit:[SQL_NO_DATA]<br>>
[ODBC]
[8246][SQLFreeHandle.c][268]<br>> Entry:<br>>
Handle Type = 2<br>> Input Handle =
0x8052c08<br>> [ODBC][8246][SQLFreeHandle.c][317]<br>>
Exit:[SQL_SUCCESS]<br>> [ODBC][8246][SQLFreeHandle.c][203]<br>>
Entry:<br>> Handle Type = 1<br>>
Input Handle = 0x8052488<br>> [ODBC][8500][__handles.c][421]<br>>
Exit:[SQL_SUCCESS]<br>> Environment =
0x8052488<br>> [ODBC][8500][SQLAllocHandle.c][345]<br>>
Entry:<br>> Handle Type = 2<br>>
Input Handle = 0x8052488<br>> [ODBC][8500][SQLAllocHandle.c][463]<br>>
Exit:[SQL_SUCCESS]<br>> Output Handle =
0x8052c08<br>> [ODBC][8500][SQLConnect.c][3452]<br>>
Entry:<br>> Connection = 0x8052c08<br>>
Server Name = [mssql][length = 5 (SQL_NTS)]<br>>
User Name = [bmcneely][length = 8 (SQL_NTS)]<br>>
Authentication = [][length = 0 (SQL_NTS)]<br>> UNICODE Using
encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'<br>> <br>>
DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source<br>> <br>>
[ODBC][8500][SQLConnect.c][3820]<br>> Exit:[SQL_ERROR]<br>>
[ODBC][8500][SQLError.c][424]<br>> Entry:<br>>
Connection = 0x8052c08<br>> SQLState =
0xbfffebd0<br>> Native = 0xbfffebc8<br>>
Message Text = 0xbfffebe0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebce<br>>
[ODBC][8500][SQLError.c][461]<br>> Exit:[SQL_SUCCESS]<br>>
SQLState = S1000<br>> Native =
0xbfffebc8 -> 0<br>> Message Text =
[[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]<br>>
[ODBC][8500][SQLError.c][424]<br>> Entry:<br>>
Connection = 0x8052c08<br>> SQLState =
0xbfffebd0<br>> Native = 0xbfffebc8<br>>
Message Text = 0xbfffebe0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebce<br>>
[ODBC][8500][SQLError.c][461]<br>> Exit:[SQL_NO_DATA]<br>>
[ODBC][8500][SQLError.c][504]<br>> Entry:<br>>
Environment = 0x8052488<br>> SQLState =
0xbfffebd0<br>> Native = 0xbfffebc8<br>>
Message Text = 0xbfffebe0<br>> Buffer
Length = 500<br>> Text Len Ptr = 0xbfffebce<br>>
[ODBC][8500][SQLError.c][541]<br>> Exit:[SQL_NO_DATA]<br>>
[ODBC][8500][SQLFreeHandle.c][268]<br>> Entry:<br>>
Handle Type = 2<br>> Input Handle =
0x8052c08<br>> [ODBC][8500][SQLFreeHandle.c][317]<br>>
Exit:[SQL_SUCCESS]<br>> [ODBC][8500][SQLFreeHandle.c][203]<br>>
Entry:<br>> Handle Type = 1<br>>
Input Handle = 0x8052488<br>> <br>> Any help is greatly
appreciated.<br>> <br>> Regards,<br>> Brad McNeely<br>> <br>>
_______________________________________________<br>> Join Excite! -
http://www.excite.com<br>> The most personalized portal on the Web!<br>>
_______________________________________________<br>> FreeTDS mailing
list<br>> FreeTDS AT lists.ibiblio.org<br>>
http://lists.ibiblio.org/mailman/listinfo/freetds<br>><br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!




Archive powered by MHonArc 2.6.24.

Top of Page