osql: driver line incomplete
Dave Dumaresq <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
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 I ran this by the folks at unixODBC and they suggested the issue might be with freeTDS, since the isql logs show Handle Type = 1, I've included the sql dump file below. I ran osql and found it reports driver line incomplete, but I'm unable to figure out what might be the cause. I tried adding Setup=/usr/lib/ odbc/libtdsS.so to my odbc.ini (even though it's not recommended in the freeTDS configuration documentation), but that didn't make any difference. $ osql -S dsn_myvista -U sa -P 1234 looking for odbc.ini and odbcinst.ini in /usr/local/unixODBC/etc reading "/home/ddumaresq/.odbc.ini" [dsn_myvista] not found in "/home/ddumaresq/.odbc.ini" reading "/usr/local/unixODBC/etc/odbc.ini" [dsn_myvista] found in "/usr/local/unixODBC/etc/odbc.ini" found this section: [dsn_myvista] ##Driver=FreeTDS Driver=/usr/local/freetds/lib/libtdsodbc.so Setup=/usr/lib/odbc/libtdsS.so Description=My local vista box containing ACP Server=dfd.present.bccampus.ca Port=1433 User=sa Password=1234 Database=ldap looking for driver for DSN [dsn_myvista] driver line incomplete for [dsn_myvista] in odbc.ini looking for driver for DSN [default] osql: error: no driver found for [dsn_myvista] in odbc.ini cat /tmp/sql.log [ODBC][3011][1304616383.932571][__handles.c][459] Exit:[SQL_SUCCESS] Environment = 0x8c59f30 [ODBC][3011][1304616383.932848][SQLAllocHandle.c][375] Entry: Handle Type = 2 Input Handle = 0x8c59f30 [ODBC][3011][1304616383.932995][SQLAllocHandle.c][493] Exit:[SQL_SUCCESS] Output Handle = 0x8c5a6b0 [ODBC][3011][1304616383.933201][SQLConnect.c][3654] Entry: Connection = 0x8c5a6b0 Server Name = [dsn_myvista][length = 11 (SQL_NTS)] User Name = [sa][length = 2 (SQL_NTS)] Authentication = [****][length = 4 (SQL_NTS)] UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE' 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][3011][1304616383.972882][SQLConnect.c][4021] Exit:[SQL_ERROR] [ODBC][3011][1304616383.973055][SQLError.c][434] Entry: Connection = 0x8c5a6b0 SQLState = 0xbfb40332 Native = 0xbfb40134 Message Text = 0xbfb4013d Buffer Length = 500 Text Len Ptr = 0xbfb4013a [ODBC][3011][1304616383.973272][SQLError.c][471] Exit:[SQL_SUCCESS] SQLState = S1000 Native = 0xbfb40134 -> 0 Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data source] [ODBC][3011][1304616383.973441][SQLError.c][434] Entry: Connection = 0x8c5a6b0 SQLState = 0xbfb40332 Native = 0xbfb40134 Message Text = 0xbfb4013d Buffer Length = 500 Text Len Ptr = 0xbfb4013a [ODBC][3011][1304616383.973534][SQLError.c][471] Exit:[SQL_SUCCESS] SQLState = 01000 Native = 0xbfb40134 -> 20002 Message Text = [[unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed] [ODBC][3011][1304616383.973623][SQLError.c][434] Entry: Connection = 0x8c5a6b0 SQLState = 0xbfb40332 Native = 0xbfb40134 Message Text = 0xbfb4013d Buffer Length = 500 Text Len Ptr = 0xbfb4013a [ODBC][3011][1304616383.973708][SQLError.c][471] Exit:[SQL_SUCCESS] SQLState = 01000 Native = 0xbfb40134 -> 20017 Message Text = [[unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server] [ODBC][3011][1304616383.973795][SQLError.c][434] Entry: Connection = 0x8c5a6b0 SQLState = 0xbfb40332 Native = 0xbfb40134 Message Text = 0xbfb4013d Buffer Length = 500 Text Len Ptr = 0xbfb4013a [ODBC][3011][1304616383.973873][SQLError.c][471] Exit:[SQL_NO_DATA] [ODBC][3011][1304616383.973953][SQLError.c][514] Entry: Environment = 0x8c59f30 SQLState = 0xbfb40332 Native = 0xbfb40134 Message Text = 0xbfb4013d Buffer Length = 500 Text Len Ptr = 0xbfb4013a [ODBC][3011][1304616383.974032][SQLError.c][551] Exit:[SQL_NO_DATA] [ODBC][3011][1304616383.974203][SQLFreeHandle.c][286] Entry: Handle Type = 2 Input Handle = 0x8c5a6b0 [ODBC][3011][1304616383.974288][SQLFreeHandle.c][337] Exit:[SQL_SUCCESS] [ODBC][3011][1304616383.974378][SQLFreeHandle.c][219] Entry: Handle Type = 1 Input Handle = 0x8c59f30 -- Dave Dumaresq Technical Analyst - BCcampus 200 - 555 Seymour St, Vancouver BC Phone: 604-412-7738