Skip to Content.
Sympa Menu

freetds - [freetds] tsql connection attempt returns Message 20000 "No error"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Gulati, Samveen" <Samveen.Gulati AT savvis.com>
  • To: "FreeTDS AT lists.ibiblio.org" <FreeTDS AT lists.ibiblio.org>
  • Subject: [freetds] tsql connection attempt returns Message 20000 "No error"
  • Date: Tue, 23 Jul 2013 13:42:35 +0000

Hi,

I have a problem and Google is no help. I need to connect to a Sybase server
with FreeTDS, but there is no internal documentation on the Sybase server
version, and I don't have access to the DB. I only have the host, port, db
and credentials.
This connection attempt is to debug perl-DBD-Sybase (using FreeTDS)
connectivity.

On trying connecting to the server, I get:

[tools@lookingglass src]$ tsql -H sl7ncappdv12.savvis.lab -p 4100 -U netcool
-P netcool
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Msg 20000 (severity 0, state 0) from COL_P_1:
"No error"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server


Telnet works:
[tools@lookingglass src]$ telnet sl7ncappdv12.savvis.lab 4100
Trying 10.12.194.107...
Connected to sl7ncappdv12.savvis.lab.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

The freetds log is:

log.c:196:Starting log file for FreeTDS 0.91
on 2013-07-23 13:09:22 with debug flags 0x4fff.
iconv.c:330:tds_iconv_open(0x2243940, UTF-8)
iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:349:setting up conversions for client charset "UTF-8"
iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion
iconv.c:391:preparing iconv for "ISO-8859-1" <-> "ISO-8859-1" conversion
iconv.c:394:tds_iconv_open: done
net.c:205:Connecting to 10.12.194.107 port 4100 (TDS version 4.2)
net.c:270:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:310:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
net.c:741:Sending packet
0000 02 00 02 00 00 00 00 00-6c 6f 6f 6b 69 6e 67 67 |........ lookingg|
0010 6c 61 73 73 2e 73 61 76-76 69 73 2e 6c 61 62 00 |lass.sav vis.lab.|
0020 00 00 00 00 00 00 17 6e-65 74 63 6f 6f 6c 00 00 |.......n etcool..|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 07 6e 65-74 63 6f 6f 6c 00 00 00 |......ne tcool...|
0050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0060 00 00 00 00 07 31 34 30-38 39 00 00 00 00 00 00 |.....140 89......|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 05 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........|
0090 00 00 00 00 54 53 51 4c-00 00 00 00 00 00 00 00 |....TSQL ........|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 04 73 6c 37 6e 63-61 70 70 64 76 31 32 2e |...sl7nc appdv12.|
00c0 73 61 76 76 69 73 2e 6c-61 62 00 00 00 00 00 00 |savvis.l ab......|
00d0 00 17 6e 65 74 63 6f 6f-6c 00 00 00 00 00 00 00 |..netcoo l.......|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 07 04 02 00 00 54 44-53 2d 4c 69 62 72 61 72 |......TD S-Librar|
01e0 0a 00 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|

net.c:741:Sending packet
0000 02 01 00 4c 00 00 00 00-00 00 00 00 00 00 0a 00 |...L.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 69 73 6f |........ .....iso|
0020 5f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |_1...... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-00 00 00 00 |........ ....|

token.c:328:tds_process_login_tokens()
net.c:555:Received header
0000 04 01 00 2f 00 00 01 00- |.../....|

net.c:609:Received packet
0000 04 01 00 2f 00 00 01 00-ab 1b 00 20 4e 00 00 00 |.../.... ... N...|
0010 00 08 00 4e 6f 20 65 72-72 6f 72 07 43 4f 4c 5f |...No er ror.COL_|
0020 50 5f 31 00 00 00 fd 02-00 00 00 00 00 00 00 |P_1..... .......|

token.c:337:looking for login token, got ab(INFO)
token.c:122:tds_process_default_tokens() marker is ab(INFO)
token.c:2588:tds_process_msg() reading message 20000 from server
token.c:2661:tds_process_msg() calling client msg handler
token.c:2674:tds_process_msg() returning TDS_SUCCEED
token.c:337:looking for login token, got fd(DONE)
token.c:122:tds_process_default_tokens() marker is fd(DONE)
token.c:2339:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2355:tds_process_end() state set to TDS_IDLE
token.c:2370: rows_affected = 0
token.c:438:tds_process_login_tokens() returning TDS_FAIL
login.c:466:login packet accepted
util.c:156:Changed query state from IDLE to DEAD
util.c:331:tdserror(0x22436a0, 0x2243940, 20002, 0)
util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:384:tdserror: returning TDS_INT_CANCEL(2)
mem.c:615:tds_free_all_results()

System info:
[tools@lookingglass ~]$ uname -a
Linux lookingglass.savvis.lab 2.6.18-194.17.1.el5 #1 SMP Mon Sep 20 07:12:06
EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

FreeTDS info:
[tools@lookingglass ~]$ tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc
MS db-lib source compatibility: yes
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes

FreeTDS Package info:
[tools@lookingglass ~]$ rpm -qi freetds
Name : freetds Relocations: (not relocatable)
Version : 0.91 Vendor: Fedora Project
Release : 2.el5 Build Date: Mon 27 Feb 2012
01:59:56 PM UTC
Install Date: Tue 23 Jul 2013 09:36:48 AM UTC Build Host:
x86-13.phx2.fedoraproject.org
Group : System Environment/Libraries Source RPM:
freetds-0.91-2.el5.src.rpm
Size : 2646873 License: LGPLv2+ and GPLv2+
Signature : DSA/SHA1, Mon 27 Feb 2012 06:53:34 PM UTC, Key ID
119cc036217521f6
Packager : Fedora Project
URL : http://www.freetds.org/
Summary : Implementation of the TDS (Tabular DataStream) protocol
Description :
FreeTDS is a project to document and implement the TDS (Tabular
DataStream) protocol. TDS is used by Sybase(TM) and Microsoft(TM) for
client to database server communications. FreeTDS includes call
level interfaces for DB-Lib, CT-Lib, and ODBC.

The only info about this error seems to be
http://infocenter.sybase.com/help/advanced/help.jsp?topic=/com.sybase.infocenter.dc00462.1540/reference/messages/msgnum20000.html
, which gives me nothing.

Now I'm at a loss and don't know what to do. Any pointers?

Samveen S. GulatiĀ | Senior Software Engineer | Enterprise Automation Systems

Savvis, A CenturyLink Company
Salarpuria Touchstone, 2nd Floor
Survey No. 15/1A & 14P7
Kadubeesanahalli, Varthur Hobli
Bangalore, India
Mobile: +91.90.0886.6221
www.savvis.com


This message contains information which may be confidential and/or
privileged. Unless you are the intended recipient (or authorized to receive
for the intended recipient), you may not read, use, copy or disclose to
anyone the message or any information contained in the message. If you have
received the message in error, please advise the sender by reply e-mail and
delete the message and any attachment(s) thereto without retaining any copies.



  • [freetds] tsql connection attempt returns Message 20000 "No error", Gulati, Samveen, 07/23/2013

Archive powered by MHonArc 2.6.24.

Top of Page