[unixODBC-support] [unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server

eric.berg at barclayscapital.com eric.berg at barclayscapital.com
Thu May 5 16:48:46 BST 2011


Possible you need to use quotes around your password?  I've run into that manifest as a bug in our code recently, where my pw contained something like $ or # and it had to be enclosed in single quotes in order for it to be handled properly and passed in tact as a param to isql.

> -----Original Message-----
> From: unixodbc-support-bounces at mailman.unixodbc.org [mailto:unixodbc-
> support-bounces at mailman.unixodbc.org] On Behalf Of Dave Dumaresq
> Sent: Thursday, May 05, 2011 11:31 AM
> To: Support for the unixODBC project
> Subject: Re: [unixODBC-support] [unixODBC][FreeTDS][SQL Server]Unexpected
> EOF from the server
> 
> Thanks for your reply, Nick. I tried your suggestion, and the log does
> show the credentials getting passed in, but it returns the same error.
> (log below).
> 
> > isql -v dsn user pass
> 
> Dave
> 
> cat /tmp/sql.log
> [ODBC][1998][1304536761.718727][__handles.c][459]
> 		Exit:[SQL_SUCCESS]
> 			Environment = 0x945ef30
> [ODBC][1998][1304536761.719232][SQLAllocHandle.c][375]
> 		Entry:
> 			Handle Type = 2
> 			Input Handle = 0x945ef30
> [ODBC][1998][1304536761.719387][SQLAllocHandle.c][493]
> 		Exit:[SQL_SUCCESS]
> 			Output Handle = 0x945f690
> [ODBC][1998][1304536761.719573][SQLConnect.c][3654]
> 		Entry:
> 			Connection = 0x945f690
> 			Server Name = [dsn_myvista][length = 11 (SQL_NTS)]
> 			User Name = [NULL]
> 			Authentication = [NULL]
> 		DIAG [01000] [FreeTDS][SQL Server]Unexpected EOF from the
> server
> 
> 		DIAG [01000] [FreeTDS][SQL Server]Adaptive Server connection
> failed
> 
> 		DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data
> source
> 
> [ODBC][1998][1304536761.761946][SQLConnect.c][4021]
> 		Exit:[SQL_ERROR]
> [ODBC][1998][1304536761.762111][SQLError.c][434]
> 		Entry:
> 			Connection = 0x945f690
> 			SQLState = 0xbfedc322
> 			Native = 0xbfedc124
> 			Message Text = 0xbfedc12d
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbfedc12a
> [ODBC][1998][1304536761.762319][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = S1000
> 			Native = 0xbfedc124 -> 0
> 			Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to
> connect to
> data source]
> [ODBC][1998][1304536761.762513][SQLError.c][434]
> 		Entry:
> 			Connection = 0x945f690
> 			SQLState = 0xbfedc322
> 			Native = 0xbfedc124
> 			Message Text = 0xbfedc12d
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbfedc12a
> [ODBC][1998][1304536761.762609][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = 01000
> 			Native = 0xbfedc124 -> 20002
> 			Message Text = [[unixODBC][FreeTDS][SQL Server]Adaptive
> Server
> connection failed]
> [ODBC][1998][1304536761.762692][SQLError.c][434]
> 		Entry:
> 			Connection = 0x945f690
> 			SQLState = 0xbfedc322
> 			Native = 0xbfedc124
> 			Message Text = 0xbfedc12d
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbfedc12a
> [ODBC][1998][1304536761.762841][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = 01000
> 			Native = 0xbfedc124 -> 20017
> 			Message Text = [[unixODBC][FreeTDS][SQL
> Server]Unexpected EOF from
> the server]
> [ODBC][1998][1304536761.763083][SQLError.c][434]
> 		Entry:
> 			Connection = 0x945f690
> 			SQLState = 0xbfedc322
> 			Native = 0xbfedc124
> 			Message Text = 0xbfedc12d
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbfedc12a
> [ODBC][1998][1304536761.763159][SQLError.c][471]
> 		Exit:[SQL_NO_DATA]
> [ODBC][1998][1304536761.763276][SQLError.c][514]
> 		Entry:
> 			Environment = 0x945ef30
> 			SQLState = 0xbfedc322
> 			Native = 0xbfedc124
> 			Message Text = 0xbfedc12d
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbfedc12a
> [ODBC][1998][1304536761.763357][SQLError.c][551]
> 		Exit:[SQL_NO_DATA]
> [ODBC][1998][1304536761.763711][SQLFreeHandle.c][286]
> 		Entry:
> 			Handle Type = 2
> 			Input Handle = 0x945f690
> [ODBC][1998][1304536761.763818][SQLFreeHandle.c][337]
> 		Exit:[SQL_SUCCESS]
> [ODBC][1998][1304536761.763895][SQLFreeHandle.c][219]
> 		Entry:
> 			Handle Type = 1
> 			Input Handle = 0x945ef30
> [ODBC][2347][1304608402.122362][__handles.c][459]
> 		Exit:[SQL_SUCCESS]
> 			Environment = 0x8be7f30
> [ODBC][2347][1304608402.135885][SQLAllocHandle.c][375]
> 		Entry:
> 			Handle Type = 2
> 			Input Handle = 0x8be7f30
> [ODBC][2347][1304608402.136015][SQLAllocHandle.c][493]
> 		Exit:[SQL_SUCCESS]
> 			Output Handle = 0x8be8690
> [ODBC][2347][1304608402.136190][SQLConnect.c][3654]
> 		Entry:
> 			Connection = 0x8be8690
> 			Server Name = [dsn_myvista][length = 11 (SQL_NTS)]
> 			User Name = [sa][length = 2 (SQL_NTS)]
> 			Authentication = [****][length = 4 (SQL_NTS)]
> 		DIAG [01000] [FreeTDS][SQL Server]Unexpected EOF from the
> server
> 
> 		DIAG [01000] [FreeTDS][SQL Server]Adaptive Server connection
> failed
> 
> 		DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data
> source
> 
> [ODBC][2347][1304608402.304754][SQLConnect.c][4021]
> 		Exit:[SQL_ERROR]
> [ODBC][2347][1304608402.304968][SQLError.c][434]
> 		Entry:
> 			Connection = 0x8be8690
> 			SQLState = 0xbffbe1d2
> 			Native = 0xbffbdfd4
> 			Message Text = 0xbffbdfdd
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbffbdfda
> [ODBC][2347][1304608402.305246][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = S1000
> 			Native = 0xbffbdfd4 -> 0
> 			Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to
> connect to
> data source]
> [ODBC][2347][1304608402.305443][SQLError.c][434]
> 		Entry:
> 			Connection = 0x8be8690
> 			SQLState = 0xbffbe1d2
> 			Native = 0xbffbdfd4
> 			Message Text = 0xbffbdfdd
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbffbdfda
> [ODBC][2347][1304608402.305537][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = 01000
> 			Native = 0xbffbdfd4 -> 20002
> 			Message Text = [[unixODBC][FreeTDS][SQL Server]Adaptive
> Server
> connection failed]
> [ODBC][2347][1304608402.305666][SQLError.c][434]
> 		Entry:
> 			Connection = 0x8be8690
> 			SQLState = 0xbffbe1d2
> 			Native = 0xbffbdfd4
> 			Message Text = 0xbffbdfdd
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbffbdfda
> [ODBC][2347][1304608402.305759][SQLError.c][471]
> 		Exit:[SQL_SUCCESS]
> 			SQLState = 01000
> 			Native = 0xbffbdfd4 -> 20017
> 			Message Text = [[unixODBC][FreeTDS][SQL
> Server]Unexpected EOF from
> the server]
> [ODBC][2347][1304608402.305845][SQLError.c][434]
> 		Entry:
> 			Connection = 0x8be8690
> 			SQLState = 0xbffbe1d2
> 			Native = 0xbffbdfd4
> 			Message Text = 0xbffbdfdd
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbffbdfda
> [ODBC][2347][1304608402.305923][SQLError.c][471]
> 		Exit:[SQL_NO_DATA]
> [ODBC][2347][1304608402.306049][SQLError.c][514]
> 		Entry:
> 			Environment = 0x8be7f30
> 			SQLState = 0xbffbe1d2
> 			Native = 0xbffbdfd4
> 			Message Text = 0xbffbdfdd
> 			Buffer Length = 500
> 			Text Len Ptr = 0xbffbdfda
> [ODBC][2347][1304608402.306134][SQLError.c][551]
> 		Exit:[SQL_NO_DATA]
> [ODBC][2347][1304608402.306331][SQLFreeHandle.c][286]
> 		Entry:
> 			Handle Type = 2
> 			Input Handle = 0x8be8690
> [ODBC][2347][1304608402.306428][SQLFreeHandle.c][337]
> 		Exit:[SQL_SUCCESS]
> [ODBC][2347][1304608402.306509][SQLFreeHandle.c][219]
> 		Entry:
> 			Handle Type = 1
> 			Input Handle = 0x8be7f30
> 
> 
> 
> On 4-May-11, at 5:37 PM, Nick Gorham wrote:
> 
> > On 04/05/2011 20:30, Dave Dumaresq wrote:
> >> Greetings, I have freeTDS and unixODBC installed on Ubuntu 10.10,
> >> and I'm connecting to an SQL Server 2005 host on port 1433 running
> >> on a vista box.
> >>
> >> tsql works fine; however, isql fails with a final error message
> >> 'Unexpected EOF from the server'
> >>
> >> $ sudo isql -v dsn_myvista
> >> [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data
> >> source
> >> [01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection
> >> failed
> >> [01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
> >> [ISQL]ERROR: Could not SQLConnect
> >>
> >> The logs (below) seem to show that during the connection to
> >> [dsn_myvista] the User Name and Authentication are NULL.
> >> Any suggests about what might be wrong?
> >
> > I don;t know if the freetds driver reads user and password from the
> > ini file, you could try addingthem when you call isql
> >
> > isql -v dsn user pass
> >
> > --
> > Nick
> > _______________________________________________
> > unixODBC-support mailing list
> > unixODBC-support at mailman.unixodbc.org
> > http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
> 
> --
> Dave Dumaresq
> Technical Analyst - BCcampus
> 200 - 555 Seymour St, Vancouver BC
> Phone: 604-412-7738
> 
> 
> 
> 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________


More information about the unixODBC-support mailing list