[freetds] MS SQL Server access works with tsql but not with isql
Brad McNeely
brad_mcneely at excite.com
Mon Dec 13 20:50:26 EST 2004
Sorry, please disregard. It's working. I was fat fingering something on isql. Thanks a done for you help.
Regards,
Brad McNeely
--- On Mon 12/13, Brad McNeely < brad_mcneely at excite.com > wrote:
From: Brad McNeely [mailto: brad_mcneely at excite.com]
To: brian at bruns.com, freetds at lists.ibiblio.org
Date: Mon, 13 Dec 2004 20:46:03 -0500 (EST)
Subject: Re: [freetds] MS SQL Server access works with tsql but not with isql
<br>OK. I'm still not there. New error. I get<br> isql -v mmssql<br>[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified<br>with this config<br>/etc/unixODBC/odbc.ini<br>[mssql]<br>Description = TDS<br>Driver = TDS<br>Servername = TDS<br>Database = pubs<br>UID = bmcneely<br>PWD = <br>Port = 1433<br><br><br>/etc/freetds.conf<br>[TDS]<br>host = 192.168.1.101<br>port = 1433<br>tds version = 7.0<br><br><br><br>Here's the ODBC trace file:<br>[ODBC][4144][__handles.c][421]<br> Exit:[SQL_SUCCESS]<br> Environment = 0x8052488<br>[ODBC][4144][SQLAllocHandle.c][345]<br> Entry:<br> Handle Type = 2<br> Input Handle = 0x8052488<br>[ODBC][4144][SQLAllocHandle.c][463]<br> Exit:[SQL_SUCCESS]<br> Output Handle = 0x8052c08<br>[ODBC][4144][SQLConnect.c][3452]<br> Entry: <br> Connection = 0x8052c08 <br> Server Name = [mmssql][length = 6 (SQL_NTS)] <br> User Name = [][length = 0 (SQL_NTS)] <br> Authentication = [][length = 0 (SQL_NTS)]<br>[ODBC][4144][SQLConnect.c][3661]Error: IM002<br>[ODBC][4144][SQLError.c][424]<br> Entry: <br> Connection = 0x8052c08 <br> SQLState = 0xbfffeef0 <br> Native = 0xbfffeee8 <br> Message Text = 0xbfffef00 <br> Buffer Length = 500 <br> Text Len Ptr = 0xbfffeeee<br>[ODBC][4144][SQLError.c][461]<br> Exit:[SQL_SUCCESS] <br> SQLState = IM002 <br> Native = 0xbfffeee8 -> 0 <br> Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified]<br>[ODBC][4144][SQLError.c][424]<br> Entry: <br> Connection = 0x8052c08 <br> SQLState = 0xbfffeef0 <br> Native = 0xbfffeee8 <br> Message Text = 0xbfffef00 <br> Buffer Length = 500 <br> Text Len Ptr = 0xbfffeeee<br>[ODBC][4144][SQLError.c][461]<br> Exit:[SQL_NO_DATA]<br>[ODBC][4144][SQLError.c][504]<br> Entry: <br> Environment = 0x8052488 <br> SQLState = 0xbfffeef0 <br> Native = 0xbfffeee8 <br> Message Text = 0xbfffef00 <br> Buffer Length = 500 <br> Text Len Ptr = 0xbfffeeee<br>[ODBC][4144][SQLError.c][541]<br> Exit:[SQL_NO_DATA]<br>[ODBC][4144][SQLFreeHandle.c][268]<br> Entry:<br> Handle Type = 2<br> Input Handle = 0x8052c08<br>[ODBC][4144][SQLFreeHandle.c][317]<br> Exit:[SQL_SUCCESS]<br>[ODBC][4144][SQLFreeHandle.c][203]<br> Entry:<br> Handle Type = 1<br> Input Handle = 0x8052488<br><br><br><br>I feel like i'm getting closer. It was much easier to configure the DB2 ODBC driver. Thanks.<br><br>Regards,<br>Brad<br><br><br> --- On Mon 12/13, Brian Bruns < brian.bruns at gmail.com > wrote:<br>From: Brian Bruns [mailto: brian.bruns at gmail.com]<br>To: brad_mcneely at excite.com, freetds at lists.ibiblio.org<br>Date: Mon, 13 Dec 2004 20:02:40 -0500<br>Subject: Re: [freetds] MS SQL Server access works with tsql but not with isql<br><br>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>> File
Usage = 1<br>> <br>> /etc/unixODBC/odbc.ini<br>> [mssql]<br>> Description = TDS<br>> Driv<br> er = 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<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_S<br> UCCESS]<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<br> >> Text Len Ptr = 0xbfffebde<br>> [ODBC][8246][SQLError.c][541]<br>> Exit:[SQL_NO_DATA]<br>> [ODBC]<br> [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][8
500][SQLConnect.c][3452]<br>> Entry:<br>> Connection = 0x8052c08<br>> Server<br> 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 -><br> 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>> <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><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>
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
More information about the FreeTDS
mailing list