Skip to Content.
Sympa Menu

freetds - Re: [freetds] FREETDS MS SQL Server ODBC errors.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Gopi Chand Telukoti <gopichandt AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FREETDS MS SQL Server ODBC errors.
  • Date: Thu, 22 Oct 2009 14:20:35 +1100

Hi
____________________________________________________________________

> tsql -S MyDSN -U aamie -P xxxxxx
locale is "en_US.UTF-8"
locale charset is "UTF-8"
1> select count(*) from sysobjects;
2> go
827
(1 row affected)
1>
___________________________________________________________________
:~> isql MyDSN aamie xxxxxx -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[37000][unixODBC][FreeTDS][SQL Server]Cannot open database requested in
login 'aamie'. Login fails.
[37000][unixODBC][FreeTDS][SQL Server]Login failed for user 'aamie'.
[ISQL]ERROR: Could not SQLConnect
:~>

___________________________________________________________________

:~> cat /etc/unixODBC/odbc.ini
[MyDSN]
Driver = FreeTDS
Description = SQL Server
Trace = Yes
TraceFile = /tmp/mstest.log
Server = 192.74.169.119
Database = aamie
Port = 1433
TDS_Version = 8.0
:~>
___________________________________________________________________

:~> cat /etc/unixODBC/odbcinst.ini
[FreeTDS]
Description = freetds with protocol v8.0
Driver = /wa01/aamie/app/src/freetds/lib/libtdsodbc.so
FileUsage = 1
[ODBC]
Trace = Yes
TraceFile = /tmp/trace_odbinst.log
ForceTrace = Yes
:~>
_____________________________________________________________________

:~> TDSDUMP=stdout isql MyDSN aamie xxxxxx -v
log.c:190:Starting log file for FreeTDS 0.82.1.dev.20090930
on 2009-10-22 14:10:28 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "ISO-8859-1" character
set
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.74.169.119 port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:735:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 00 f7 00 00 01 00- |........|
net.c:671:Received packet
0000 aa 98 00 dc 0f 00 00 01-0b 3d 00 43 00 61 00 6e |........ .=.C.a.n|
0010 00 6e 00 6f 00 74 00 20-00 6f 00 70 00 65 00 6e |.n.o.t. .o.p.e.n|
0020 00 20 00 64 00 61 00 74-00 61 00 62 00 61 00 73 |. .d.a.t .a.b.a.s|
0030 00 65 00 20 00 72 00 65-00 71 00 75 00 65 00 73 |.e. .r.e .q.u.e.s|
0040 00 74 00 65 00 64 00 20-00 69 00 6e 00 20 00 6c |.t.e.d. .i.n. .l|
0050 00 6f 00 67 00 69 00 6e-00 20 00 27 00 61 00 61 |.o.g.i.n . .'.a.a|
0060 00 6d 00 69 00 65 00 27-00 2e 00 20 00 4c 00 6f |.m.i.e.' ... .L.o|
0070 00 67 00 69 00 6e 00 20-00 66 00 61 00 69 00 6c |.g.i.n. .f.a.i.l|
0080 00 73 00 2e 00 09 57 00-53 00 44 00 42 00 30 00 |.s....W. S.D.B.0.|
0090 31 00 31 00 36 00 56 00-00 00 00 aa 48 00 18 48 |1.1.6.V. ....H..H|
00a0 00 00 01 0e 1e 00 4c 00-6f 00 67 00 69 00 6e 00 |......L. o.g.i.n.|
00b0 20 00 66 00 61 00 69 00-6c 00 65 00 64 00 20 00 | .f.a.i. l.e.d. .|
00c0 66 00 6f 00 72 00 20 00-75 00 73 00 65 00 72 00 |f.o.r. . u.s.e.r.|
00d0 20 00 27 00 61 00 61 00-6d 00 69 00 65 00 27 00 | .'.a.a. m.i.e.'.|
00e0 2e 00 00 00 00 00 fd 02-00 00 00 00 00 00 00 |........ .......|
token.c:316:looking for login token, got aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 4060 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 18456 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232: rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 0
util.c:162:Changed query state from IDLE to DEAD
util.c:334:tdserror(0x524380, 0x525300, 20002, 0)
odbc.c:2032:msgno 20002 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
mem.c:609:tds_free_all_results()
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf40, 0x7fbfffd904,
0x7fbfffdd30, 513, 0x7fbfffd90a)
odbc.c:3752:SQLFreeConnect(0x524620)
odbc.c:3724:_SQLFreeConnect(0x524620)
odbc.c:3775:SQLFreeEnv(0x524340)
odbc.c:3762:_SQLFreeEnv(0x524340)
odbc.c:3775:SQLFreeEnv(0x524340)
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[37000][unixODBC][FreeTDS][SQL Server]Cannot open database requested in
login 'aamie'. Login fails.
[37000][unixODBC][FreeTDS][SQL Server]Login failed for user 'aamie'.
[ISQL]ERROR: Could not SQLConnect
:~>
___________________________________________________________________



___________________________________________________________________

[ODBC][28551][__handles.c][421]
Exit:[SQL_SUCCESS]
Environment = 0x50c380
[ODBC][28551][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0x50c380
[ODBC][28551][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0x50cca0
[ODBC][28551][SQLConnect.c][3452]
Entry:
Connection = 0x50cca0
Server Name = [MyDSN][length = 5 (SQL_NTS)]
User Name = [aamie][length = 5 (SQL_NTS)]
Authentication = [********][length = 8 (SQL_NTS)]
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
DIAG [42000] [FreeTDS][SQL Server]Login failed for user 'aamie'.
DIAG [42000] [FreeTDS][SQL Server]Cannot open database requested in login
'aamie'. Login fails.
DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source
[ODBC][28551][SQLConnect.c][3820]
Exit:[SQL_ERROR]
[ODBC][28551][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe820
Native = 0x7fbfffe818
Message Text = 0x7fbfffe830
Buffer Length = 500
Text Len Ptr = 0x7fbfffe81e
[ODBC][28551][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = S1000
Native = 0x7fbfffe818 -> 0
Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data
source]
[ODBC][28551][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe820
Native = 0x7fbfffe818
Message Text = 0x7fbfffe830
Buffer Length = 500
Text Len Ptr = 0x7fbfffe81e
[ODBC][28551][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0x7fbfffe818 -> 4060
Message Text = [[unixODBC][FreeTDS][SQL Server]Cannot open database
requested in login 'aamie'. Login fails.]
[ODBC][28551][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe820
Native = 0x7fbfffe818
Message Text = 0x7fbfffe830
Buffer Length = 500
Text Len Ptr = 0x7fbfffe81e
[ODBC][28551][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0x7fbfffe818 -> 18456
Message Text = [[unixODBC][FreeTDS][SQL Server]Login failed for user
'aamie'.]
[ODBC][28551][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe820
Native = 0x7fbfffe818
Message Text = 0x7fbfffe830
Buffer Length = 500
Text Len Ptr = 0x7fbfffe81e
[ODBC][28551][SQLError.c][461]
Exit:[SQL_NO_DATA]
[ODBC][28551][SQLError.c][504]
Entry:
Environment = 0x50c380
SQLState = 0x7fbfffe820
Native = 0x7fbfffe818
Message Text = 0x7fbfffe830
Buffer Length = 500
Text Len Ptr = 0x7fbfffe81e
[ODBC][28551][SQLError.c][541]
Exit:[SQL_NO_DATA]
[ODBC][28551][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 0x50cca0
[ODBC][28551][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][28551][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 0x50c380
[ODBC][28569][__handles.c][421]
Exit:[SQL_SUCCESS]
Environment = 0x50c380
[ODBC][28569][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0x50c380
[ODBC][28569][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0x50cca0
[ODBC][28569][SQLConnect.c][3452]
Entry:
Connection = 0x50cca0
Server Name = [MyDSN][length = 5 (SQL_NTS)]
User Name = [aamie][length = 5 (SQL_NTS)]
Authentication = [********][length = 8 (SQL_NTS)]
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
DIAG [42000] [FreeTDS][SQL Server]Login failed for user 'aamie'.
DIAG [42000] [FreeTDS][SQL Server]Cannot open database requested in login
'aamie'. Login fails.
DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source
[ODBC][28569][SQLConnect.c][3820]
Exit:[SQL_ERROR]
[ODBC][28569][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe810
Native = 0x7fbfffe808
Message Text = 0x7fbfffe820
Buffer Length = 500
Text Len Ptr = 0x7fbfffe80e
[ODBC][28569][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = S1000
Native = 0x7fbfffe808 -> 0
Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data
source]
[ODBC][28569][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe810
Native = 0x7fbfffe808
Message Text = 0x7fbfffe820
Buffer Length = 500
Text Len Ptr = 0x7fbfffe80e
[ODBC][28569][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0x7fbfffe808 -> 4060
Message Text = [[unixODBC][FreeTDS][SQL Server]Cannot open database
requested in login 'aamie'. Login fails.]
[ODBC][28569][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe810
Native = 0x7fbfffe808
Message Text = 0x7fbfffe820
Buffer Length = 500
Text Len Ptr = 0x7fbfffe80e
[ODBC][28569][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0x7fbfffe808 -> 18456
Message Text = [[unixODBC][FreeTDS][SQL Server]Login failed for user
'aamie'.]
[ODBC][28569][SQLError.c][424]
Entry:
Connection = 0x50cca0
SQLState = 0x7fbfffe810
Native = 0x7fbfffe808
Message Text = 0x7fbfffe820
Buffer Length = 500
Text Len Ptr = 0x7fbfffe80e
[ODBC][28569][SQLError.c][461]
Exit:[SQL_NO_DATA]
[ODBC][28569][SQLError.c][504]
Entry:
Environment = 0x50c380
SQLState = 0x7fbfffe810
Native = 0x7fbfffe808
Message Text = 0x7fbfffe820
Buffer Length = 500
Text Len Ptr = 0x7fbfffe80e
[ODBC][28569][SQLError.c][541]
Exit:[SQL_NO_DATA]
[ODBC][28569][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 0x50cca0
[ODBC][28569][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][28569][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 0x50c380
________________________________________________________________________________


log.c:190:Starting log file for FreeTDS 0.82.1.dev.20090930
on 2009-10-22 14:11:21 with debug flags 0x4fff.
iconv.c:197:names for ISO-8859-1: ISO-8859-1
iconv.c:197:names for UTF-8: UTF-8
iconv.c:197:names for UCS-2LE: UCS-2LE
iconv.c:197:names for UCS-2BE: UCS-2BE
iconv.c:363:iconv to convert client-side data to the "ISO-8859-1" character
set
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
iconv.c:516:tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"
net.c:210:Connecting to 192.74.169.119 port 1433 (TDS version 8.0)
net.c:264:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:303:tds_open_socket() succeeded
util.c:162:Changed query state from DEAD to IDLE
login.c:735:quietly sending TDS 7+ login packet
token.c:312:tds_process_login_tokens()
net.c:592:Received header
0000 04 01 00 f7 00 00 01 00- |........|
net.c:671:Received packet
0000 aa 98 00 dc 0f 00 00 01-0b 3d 00 43 00 61 00 6e |........ .=.C.a.n|
0010 00 6e 00 6f 00 74 00 20-00 6f 00 70 00 65 00 6e |.n.o.t. .o.p.e.n|
0020 00 20 00 64 00 61 00 74-00 61 00 62 00 61 00 73 |. .d.a.t .a.b.a.s|
0030 00 65 00 20 00 72 00 65-00 71 00 75 00 65 00 73 |.e. .r.e .q.u.e.s|
0040 00 74 00 65 00 64 00 20-00 69 00 6e 00 20 00 6c |.t.e.d. .i.n. .l|
0050 00 6f 00 67 00 69 00 6e-00 20 00 27 00 61 00 61 |.o.g.i.n . .'.a.a|
0060 00 6d 00 69 00 65 00 27-00 2e 00 20 00 4c 00 6f |.m.i.e.' ... .L.o|
0070 00 67 00 69 00 6e 00 20-00 66 00 61 00 69 00 6c |.g.i.n. .f.a.i.l|
0080 00 73 00 2e 00 09 57 00-53 00 44 00 42 00 30 00 |.s....W. S.D.B.0.|
0090 31 00 31 00 36 00 56 00-00 00 00 aa 48 00 18 48 |1.1.6.V. ....H..H|
00a0 00 00 01 0e 1e 00 4c 00-6f 00 67 00 69 00 6e 00 |......L. o.g.i.n.|
00b0 20 00 66 00 61 00 69 00-6c 00 65 00 64 00 20 00 | .f.a.i. l.e.d. .|
00c0 66 00 6f 00 72 00 20 00-75 00 73 00 65 00 72 00 |f.o.r. . u.s.e.r.|
00d0 20 00 27 00 61 00 61 00-6d 00 69 00 65 00 27 00 | .'.a.a. m.i.e.'.|
00e0 2e 00 00 00 00 00 fd 02-00 00 00 00 00 00 00 |........ .......|
token.c:316:looking for login token, got aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 4060 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got aa(ERROR)
token.c:108:tds_process_default_tokens() marker is aa(ERROR)
token.c:2451:tds_process_msg() reading message from server
token.c:2516:tds_process_msg() calling client msg handler
odbc.c:2032:msgno 18456 20003
token.c:2529:tds_process_msg() returning TDS_SUCCEED
token.c:316:looking for login token, got fd(DONE)
token.c:108:tds_process_default_tokens() marker is fd(DONE)
token.c:2201:tds_process_end: more_results = 0
was_cancelled = 0
error = 1
done_count_valid = 0
token.c:2217:tds_process_end() state set to TDS_IDLE
token.c:2232: rows_affected = 0
token.c:393:leaving tds_process_login_tokens() returning 0
util.c:162:Changed query state from IDLE to DEAD
util.c:334:tdserror(0x524380, 0x525300, 20002, 0)
odbc.c:2032:msgno 20002 20003
util.c:368:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:389:tdserror: returning TDS_INT_CANCEL(2)
mem.c:609:tds_free_all_results()
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:574:SQLError((nil), 0x524620, (nil), 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
error.c:510:_SQLGetDiagRec(2, 0x524620, 1, 0x7fbfffdf30, 0x7fbfffd8f4,
0x7fbfffdd20, 513, 0x7fbfffd8fa)
odbc.c:3752:SQLFreeConnect(0x524620)
odbc.c:3724:_SQLFreeConnect(0x524620)
odbc.c:3775:SQLFreeEnv(0x524340)
odbc.c:3762:_SQLFreeEnv(0x524340)
odbc.c:3775:SQLFreeEnv(0x524340)
____________________________________________________________


# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10

# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
# A typical Microsoft server
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0
#PROJECT RELATED ENTRIES
[mrs_db]
host=WSDB0116V
port=1433
tds version=8.0
[mrs]
host=WSDB0116V
port=1433
tds version=8.0
[mi]
host = wsweb0308
instance = marketresearch
port = 1433
tds version = 8.0
[mi_db]
host = wsweb0308
instance = marketresearch
port = 1433
tds version = 8.0
[MyDSN]
host=WSDB0116V
port=1433
tds version=8.0
____________________________________

Regards
Gopi




Archive powered by MHonArc 2.6.24.

Top of Page