Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Communication error on ODBC connection to ASA 10 db

3 posts in General Discussion Last posting was on 2007-12-12 16:27:51.0Z
Stephan Grochowina Posted on 2007-12-07 09:39:04.0Z
Sender: 5439.4757a938.846930886@sybase.com
From: Stephan Grochowina
Newsgroups: ianywhere.public.general
Subject: Communication error on ODBC connection to ASA 10 db
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <475914b8.7573.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Dec 2007 01:39:04 -0800
X-Trace: forums-1-dub 1197020344 10.22.241.41 (7 Dec 2007 01:39:04 -0800)
X-Original-Trace: 7 Dec 2007 01:39:04 -0800, 10.22.241.41
Lines: 262
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6625
Article PK: 4874

Hello,

I'm unsuccessfully trying to establish an ODBC connection
from a 32 bit Windows Vista computer to an ASA 10.0.1.3515
build on a 64 bit Windows 2003 server through tcpip.

I created a system dsn entry on the Vista computer with a 32
bit SQL Anywhere 10 driver and the tcpip entry
HOST=87.106.28.212;PORT=49152;CPORT=49430-49450
because according to the log of the db server (-z option)
instead of port 2638 port 49152 is used. If I test the
connection I'll get the following error:

Connection failed: Connection Error: Server found, but
communication error

The consolidated database I´m trying to connect to and its
server are called 'NumigaNetTestRemote'. I chose that name
to indicate that I wanted to test a scenario where the
consolidated was on a different computer (i.e. a remote
test) and the connection was supposed to pass a firewall. I
admit the chosen name is a bit irritating.

I also checked with dblocate whether server and database
with such a name really existed on the remote computer and
to make sure that the db and servername where spelled
correctly in the system dsn. dblocate -p 49152 -d gave the
following result:

SQL Anywhere-Dienstprogramm Serverauflistung Version
10.0.1.3515
Servername Adresse Datenbank(en)
---------- ------- -------------
numiganettestremote s15225278:49152 NumigaNetTestRemote

1 Server gefunden

I noticed that the capitalisation of letters was removed
from the engine name, so I renamed the server name in the
client system dsn to 'numiganettestremote' just to rule out
case sensitive behaviour. The result was the same. I also
tried s15225278.rootmaster.info instead of the IP address.
The behaviour was identical. So I can rule out incorrect
spelling as suggested by Jeff Albion on
http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-118098&group=sybase.public.sqlanywhere.general.

The ODBC log looks like this:


Die Nov 27 2007 11:54:41
11:54:41 Verbindungsversuch mit:
UID=dba;PWD=********;DBN=NumigaNetTestRemote;ENG=NumigaNetTestRemote;
ASTOP=YES;DSN=NumigaNetTestRemote;INT=NO;DBG=YES;LOG=logNumigaNetTestRemote.log;
DMRF=NO;LINKS='TCPIP{HOST=87.106.28.212;PORT=49152;CPORT=49430-49450}';
COMP=NO
11:54:41 Verbindungsversuch mit einem laufenden Server...
11:54:41 Start der TCPIP-Verbindung wird versucht ...

11:54:41 TCP mit Winsock Version 2.2
11:54:41 Meine IP-Adresse ist 10.10.10.175
11:54:41 Meine IP-Adresse ist ::1
11:54:41 Meine IP-Adresse ist 127.0.0.1
11:54:41 TCPIP-Verbindung erfolgreich gestartet

11:54:41 TCPIP-Verbindung wird versucht (Adresse
87.106.28.212:49152 im Cache sasrv.ini gefunden)

11:54:41 Server wird an der im Cache gespeicherten Adresse
87.106.28.212:49152 ohne Broadcast gesucht
11:54:41 Server gefunden, Servername wird überprüft
11:54:46 Überprüfung des Servernamens fehlgeschlagen.
11:54:46 Server mit dem Namen numiganettestremote wird
gesucht
11:54:46 Server wird an der Adresse 87.106.28.212 gesucht
11:54:46 Server gefunden, Servername wird überprüft
11:54:51 Überprüfung des Servernamens fehlgeschlagen.
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse 10.10.255.255:49152 wird verwendet
11:54:51 Broadcastadresse 10.10.255.255:2638 wird verwendet
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse 127.255.255.255:49152 wird
verwendet
11:54:51 Broadcastadresse 127.255.255.255:2638 wird
verwendet
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse (ff02::1):49152 wird verwendet
11:54:51 Broadcastadresse (ff02::1):2638 wird verwendet
11:54:51 Datenbankserver an Adresse 87.106.28.212:49152
gefunden
11:54:51 Datenbankserver numiganettestremote auf Verbindung
TCPIP gefunden
11:54:51 Verbunden unter Verwendung von Clientadresse
10.10.10.175:49434
11:54:51 Verbunden mit Server über TCPIP an der Adresse
87.106.28.212:49152

11:56:06 Kommunikationsfunktion ApplicationConnect Code 3
11:56:06 Client getrennt
11:56:06 Verbindung mit dem Server nicht möglich


If I create a system dsn on the Computer where the db server
is running and use the 32 bit SQL Anywhere 10 driver there,
too, testing the ODBC and connecting to the DB will work
fine.

Because there is a firewall between those two computers I
made sure that the ports configured for tcpip are open
(that's why I configured the client ports, too). According
to the log there seems to be a TCPIP connect to the server.

I spotted in the ODBC-log below that an error had occurred
after SQLDriverConnectW had been called (<Invalid string
length!>). I assume that that error might be the cause of
the communication error. Is my assumption correct? What
could have caused that error and how can it be eliminated?

The ODBC-log reveals the following information:


scjview 1538-1434 ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 03D20F9C

scjview 1538-1434 EXIT SQLAllocHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 0x03D20F9C ( 0x03b94498)

scjview 1538-1434 ENTER SQLSetEnvAttr
SQLHENV 03B94498
SQLINTEGER 200
<SQL_ATTR_ODBC_VERSION>
SQLPOINTER 0x00000003
SQLINTEGER -6

scjview 1538-1434 EXIT SQLSetEnvAttr with
return
code 0 (SQL_SUCCESS)
SQLHENV 03B94498
SQLINTEGER 200
<SQL_ATTR_ODBC_VERSION>
SQLPOINTER 0x00000003 (BADMEM)
SQLINTEGER -6

scjview 1538-1434 ENTER SQLAllocHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 03B94498
SQLHANDLE * 03D20FA0

scjview 1538-1434 EXIT SQLAllocHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 03B94498
SQLHANDLE * 0x03D20FA0 ( 0x047a4888)

scjview 1538-1434 ENTER SQLSetConnectAttr
SQLHDBC 047A4888
SQLINTEGER 103
<SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x00000258
SQLINTEGER -5

scjview 1538-1434 EXIT SQLSetConnectAttr with
return code 0 (SQL_SUCCESS)
SQLHDBC 047A4888
SQLINTEGER 103
<SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x00000258 (BADMEM)
SQLINTEGER -5

scjview 1538-1434 ENTER SQLSetConnectAttrW
SQLHDBC 047A4888
SQLINTEGER 1909 <unknown>
SQLPOINTER [Unknown attribute 1909]
SQLINTEGER -3

scjview 1538-1434 EXIT SQLSetConnectAttrW with
return code 0 (SQL_SUCCESS)
SQLHDBC 047A4888
SQLINTEGER 1909 <unknown>
SQLPOINTER [Unknown attribute 1909]
SQLINTEGER -3

scjview 1538-1434 ENTER SQLDriverConnectW
HDBC 047A4888
HWND 00000000
WCHAR * 0x7043B264 [ -3] <Invalid
string
length!>
SWORD -3
WCHAR * 0x7043B264
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

scjview 1538-1434 EXIT SQLDriverConnectW with
return code -1 (SQL_ERROR)
HDBC 047A4888
HWND 00000000
WCHAR * 0x7043B264 [ -3] <Invalid
string
length!>
SWORD -3
WCHAR * 0x7043B264
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

DIAG [08001] [Sybase][ODBC Driver][SQL
Anywhere]Verbindungsfehler: Server gefunden, jedoch
Kommunikationsfehler (-832)

scjview 1538-1434 ENTER SQLErrorW
HENV 03B94498
HDBC 047A4888
HSTMT 00000000
WCHAR * 0x04B4D564 (NYI)
SDWORD * 0x04B4D560
WCHAR * 0x04B4D570
SWORD 2048
SWORD * 0x00000000

scjview 1538-1434 EXIT SQLErrorW with return
code
0 (SQL_SUCCESS)
HENV 03B94498
HDBC 047A4888
HSTMT 00000000
WCHAR * 0x04B4D564 (NYI)
SDWORD * 0x04B4D560 (-832)
WCHAR * 0x04B4D570
SWORD 2048
SWORD * 0x00000000

scjview 1538-1434 ENTER SQLFreeHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 047A4888

scjview 1538-1434 EXIT SQLFreeHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 047A4888

scjview 1538-1434 ENTER SQLFreeHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 03B94498

scjview 1538-1434 EXIT SQLFreeHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 03B94498


Thanx,
Stephan


Loya Posted on 2007-12-11 19:39:38.0Z
Reply-To: "Loya" <lkelso@isprit.com>
From: "Loya" <lkelso@isprit.com>
Newsgroups: ianywhere.public.general
References: <475914b8.7573.1681692777@sybase.com>
Subject: Re: Communication error on ODBC connection to ASA 10 db
Lines: 273
Organization: Isprit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: adsl-75-2-2-179.dsl.ipltin.sbcglobal.net
X-Original-NNTP-Posting-Host: adsl-75-2-2-179.dsl.ipltin.sbcglobal.net
Message-ID: <475ee77a@forums-1-dub>
Date: 11 Dec 2007 11:39:38 -0800
X-Trace: forums-1-dub 1197401978 75.2.2.179 (11 Dec 2007 11:39:38 -0800)
X-Original-Trace: 11 Dec 2007 11:39:38 -0800, adsl-75-2-2-179.dsl.ipltin.sbcglobal.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6634
Article PK: 4882

Stephen,
I am having a similar problem. Di you get an answer to your question? At
this point, I am just trying to find out if I can run a 32 bit problem on a
64 bit server.

Thanks,

<Stephan Grochowina> wrote in message
news:475914b8.7573.1681692777@sybase.com...
Hello,

I'm unsuccessfully trying to establish an ODBC connection
from a 32 bit Windows Vista computer to an ASA 10.0.1.3515
build on a 64 bit Windows 2003 server through tcpip.

I created a system dsn entry on the Vista computer with a 32
bit SQL Anywhere 10 driver and the tcpip entry
HOST=87.106.28.212;PORT=49152;CPORT=49430-49450
because according to the log of the db server (-z option)
instead of port 2638 port 49152 is used. If I test the
connection I'll get the following error:

Connection failed: Connection Error: Server found, but
communication error

The consolidated database I´m trying to connect to and its
server are called 'NumigaNetTestRemote'. I chose that name
to indicate that I wanted to test a scenario where the
consolidated was on a different computer (i.e. a remote
test) and the connection was supposed to pass a firewall. I
admit the chosen name is a bit irritating.

I also checked with dblocate whether server and database
with such a name really existed on the remote computer and
to make sure that the db and servername where spelled
correctly in the system dsn. dblocate -p 49152 -d gave the
following result:

SQL Anywhere-Dienstprogramm Serverauflistung Version
10.0.1.3515
Servername Adresse Datenbank(en)
---------- ------- -------------
numiganettestremote s15225278:49152 NumigaNetTestRemote

1 Server gefunden

I noticed that the capitalisation of letters was removed
from the engine name, so I renamed the server name in the
client system dsn to 'numiganettestremote' just to rule out
case sensitive behaviour. The result was the same. I also
tried s15225278.rootmaster.info instead of the IP address.
The behaviour was identical. So I can rule out incorrect
spelling as suggested by Jeff Albion on
http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-118098&group=sybase.public.sqlanywhere.general.

The ODBC log looks like this:


Die Nov 27 2007 11:54:41
11:54:41 Verbindungsversuch mit:
UID=dba;PWD=********;DBN=NumigaNetTestRemote;ENG=NumigaNetTestRemote;
ASTOP=YES;DSN=NumigaNetTestRemote;INT=NO;DBG=YES;LOG=logNumigaNetTestRemote.log;
DMRF=NO;LINKS='TCPIP{HOST=87.106.28.212;PORT=49152;CPORT=49430-49450}';
COMP=NO
11:54:41 Verbindungsversuch mit einem laufenden Server...
11:54:41 Start der TCPIP-Verbindung wird versucht ...

11:54:41 TCP mit Winsock Version 2.2
11:54:41 Meine IP-Adresse ist 10.10.10.175
11:54:41 Meine IP-Adresse ist ::1
11:54:41 Meine IP-Adresse ist 127.0.0.1
11:54:41 TCPIP-Verbindung erfolgreich gestartet

11:54:41 TCPIP-Verbindung wird versucht (Adresse
87.106.28.212:49152 im Cache sasrv.ini gefunden)

11:54:41 Server wird an der im Cache gespeicherten Adresse
87.106.28.212:49152 ohne Broadcast gesucht
11:54:41 Server gefunden, Servername wird überprüft
11:54:46 Überprüfung des Servernamens fehlgeschlagen.
11:54:46 Server mit dem Namen numiganettestremote wird
gesucht
11:54:46 Server wird an der Adresse 87.106.28.212 gesucht
11:54:46 Server gefunden, Servername wird überprüft
11:54:51 Überprüfung des Servernamens fehlgeschlagen.
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse 10.10.255.255:49152 wird verwendet
11:54:51 Broadcastadresse 10.10.255.255:2638 wird verwendet
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse 127.255.255.255:49152 wird
verwendet
11:54:51 Broadcastadresse 127.255.255.255:2638 wird
verwendet
11:54:51 Broadcast zur Suche nach Servern verwenden
11:54:51 Broadcastadresse (ff02::1):49152 wird verwendet
11:54:51 Broadcastadresse (ff02::1):2638 wird verwendet
11:54:51 Datenbankserver an Adresse 87.106.28.212:49152
gefunden
11:54:51 Datenbankserver numiganettestremote auf Verbindung
TCPIP gefunden
11:54:51 Verbunden unter Verwendung von Clientadresse
10.10.10.175:49434
11:54:51 Verbunden mit Server über TCPIP an der Adresse
87.106.28.212:49152

11:56:06 Kommunikationsfunktion ApplicationConnect Code 3
11:56:06 Client getrennt
11:56:06 Verbindung mit dem Server nicht möglich


If I create a system dsn on the Computer where the db server
is running and use the 32 bit SQL Anywhere 10 driver there,
too, testing the ODBC and connecting to the DB will work
fine.

Because there is a firewall between those two computers I
made sure that the ports configured for tcpip are open
(that's why I configured the client ports, too). According
to the log there seems to be a TCPIP connect to the server.

I spotted in the ODBC-log below that an error had occurred
after SQLDriverConnectW had been called (<Invalid string
length!>). I assume that that error might be the cause of
the communication error. Is my assumption correct? What
could have caused that error and how can it be eliminated?

The ODBC-log reveals the following information:


scjview 1538-1434 ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 03D20F9C

scjview 1538-1434 EXIT SQLAllocHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 0x03D20F9C ( 0x03b94498)

scjview 1538-1434 ENTER SQLSetEnvAttr
SQLHENV 03B94498
SQLINTEGER 200
<SQL_ATTR_ODBC_VERSION>
SQLPOINTER 0x00000003
SQLINTEGER -6

scjview 1538-1434 EXIT SQLSetEnvAttr with
return
code 0 (SQL_SUCCESS)
SQLHENV 03B94498
SQLINTEGER 200
<SQL_ATTR_ODBC_VERSION>
SQLPOINTER 0x00000003 (BADMEM)
SQLINTEGER -6

scjview 1538-1434 ENTER SQLAllocHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 03B94498
SQLHANDLE * 03D20FA0

scjview 1538-1434 EXIT SQLAllocHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 03B94498
SQLHANDLE * 0x03D20FA0 ( 0x047a4888)

scjview 1538-1434 ENTER SQLSetConnectAttr
SQLHDBC 047A4888
SQLINTEGER 103
<SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x00000258
SQLINTEGER -5

scjview 1538-1434 EXIT SQLSetConnectAttr with
return code 0 (SQL_SUCCESS)
SQLHDBC 047A4888
SQLINTEGER 103
<SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x00000258 (BADMEM)
SQLINTEGER -5

scjview 1538-1434 ENTER SQLSetConnectAttrW
SQLHDBC 047A4888
SQLINTEGER 1909 <unknown>
SQLPOINTER [Unknown attribute 1909]
SQLINTEGER -3

scjview 1538-1434 EXIT SQLSetConnectAttrW with
return code 0 (SQL_SUCCESS)
SQLHDBC 047A4888
SQLINTEGER 1909 <unknown>
SQLPOINTER [Unknown attribute 1909]
SQLINTEGER -3

scjview 1538-1434 ENTER SQLDriverConnectW
HDBC 047A4888
HWND 00000000
WCHAR * 0x7043B264 [ -3] <Invalid
string
length!>
SWORD -3
WCHAR * 0x7043B264
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

scjview 1538-1434 EXIT SQLDriverConnectW with
return code -1 (SQL_ERROR)
HDBC 047A4888
HWND 00000000
WCHAR * 0x7043B264 [ -3] <Invalid
string
length!>
SWORD -3
WCHAR * 0x7043B264
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

DIAG [08001] [Sybase][ODBC Driver][SQL
Anywhere]Verbindungsfehler: Server gefunden, jedoch
Kommunikationsfehler (-832)

scjview 1538-1434 ENTER SQLErrorW
HENV 03B94498
HDBC 047A4888
HSTMT 00000000
WCHAR * 0x04B4D564 (NYI)
SDWORD * 0x04B4D560
WCHAR * 0x04B4D570
SWORD 2048
SWORD * 0x00000000

scjview 1538-1434 EXIT SQLErrorW with return
code
0 (SQL_SUCCESS)
HENV 03B94498
HDBC 047A4888
HSTMT 00000000
WCHAR * 0x04B4D564 (NYI)
SDWORD * 0x04B4D560 (-832)
WCHAR * 0x04B4D570
SWORD 2048
SWORD * 0x00000000

scjview 1538-1434 ENTER SQLFreeHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 047A4888

scjview 1538-1434 EXIT SQLFreeHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 047A4888

scjview 1538-1434 ENTER SQLFreeHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 03B94498

scjview 1538-1434 EXIT SQLFreeHandle with
return
code 0 (SQL_SUCCESS)
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 03B94498


Thanx,
Stephan


Stephan Grochowina Posted on 2007-12-12 16:27:51.0Z
Sender: 7ce8.47596421.1804289383@sybase.com
From: Stephan Grochowina
Newsgroups: ianywhere.public.general
Subject: Re: Communication error on ODBC connection to ASA 10 db
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <47600c07.3060.1681692777@sybase.com>
References: <475ee77a@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Dec 2007 08:27:51 -0800
X-Trace: forums-1-dub 1197476871 10.22.241.41 (12 Dec 2007 08:27:51 -0800)
X-Original-Trace: 12 Dec 2007 08:27:51 -0800, 10.22.241.41
Lines: 291
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6638
Article PK: 4886

Loya,

unfortunately, not yet. I´ve done a tcpip trace and think
that the problem lies somewhere there. I´ve published the
trace in the thread
http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-118088&group=sybase.public.sqlanywhere.general.
Hopefully, someone has an idea there.

Regards,
Stephan

> Stephen,
> I am having a similar problem. Di you get an answer to
> your question? At this point, I am just trying to find
> out if I can run a 32 bit problem on a 64 bit server.
>
> Thanks,
>
> <Stephan Grochowina> wrote in message
> news:475914b8.7573.1681692777@sybase.com...
> Hello,
>
> I'm unsuccessfully trying to establish an ODBC connection
> from a 32 bit Windows Vista computer to an ASA 10.0.1.3515
> build on a 64 bit Windows 2003 server through tcpip.
>
> I created a system dsn entry on the Vista computer with a
> 32 bit SQL Anywhere 10 driver and the tcpip entry
> HOST=87.106.28.212;PORT=49152;CPORT=49430-49450
> because according to the log of the db server (-z option)
> instead of port 2638 port 49152 is used. If I test the
> connection I'll get the following error:
>
> Connection failed: Connection Error: Server found, but
> communication error
>
> The consolidated database I´m trying to connect to and
its
> server are called 'NumigaNetTestRemote'. I chose that name
> to indicate that I wanted to test a scenario where the
> consolidated was on a different computer (i.e. a remote
> test) and the connection was supposed to pass a firewall.
> I admit the chosen name is a bit irritating.
>
> I also checked with dblocate whether server and database
> with such a name really existed on the remote computer and
> to make sure that the db and servername where spelled
> correctly in the system dsn. dblocate -p 49152 -d gave the
> following result:
>
> SQL Anywhere-Dienstprogramm Serverauflistung Version
> 10.0.1.3515
> Servername Adresse Datenbank(en)
> ---------- ------- -------------
> numiganettestremote s15225278:49152 NumigaNetTestRemote
>
> 1 Server gefunden
>
> I noticed that the capitalisation of letters was removed
> from the engine name, so I renamed the server name in the
> client system dsn to 'numiganettestremote' just to rule
> out case sensitive behaviour. The result was the same. I
> also tried s15225278.rootmaster.info instead of the IP
> address. The behaviour was identical. So I can rule out
> incorrect spelling as suggested by Jeff Albion on
>
http://forums.sybase.com/cgi-bin/webnews.cgi?cmd=item-118098&group=sybase.public.sqlanywhere.general.
>
> The ODBC log looks like this:
>
>
> Die Nov 27 2007 11:54:41
> 11:54:41 Verbindungsversuch mit:
> UID=dba;PWD=********;DBN=NumigaNetTestRemote
> ;ENG=NumigaNetTestRemote; ASTOP=YES
> ;DSN=NumigaNetTestRemote;INT=NO;DBG=YES
> ;LOG=logNumigaNetTestRemote.log; DMRF=NO
> ;LINKS='TCPIP{HOST=87.106.28.212;PORT=49152
> ;CPORT=49430-49450}'; COMP=NO
> 11:54:41 Verbindungsversuch mit einem laufenden Server...
> 11:54:41 Start der TCPIP-Verbindung wird versucht ...
>
> 11:54:41 TCP mit Winsock Version 2.2
> 11:54:41 Meine IP-Adresse ist 10.10.10.175
> 11:54:41 Meine IP-Adresse ist ::1
> 11:54:41 Meine IP-Adresse ist 127.0.0.1
> 11:54:41 TCPIP-Verbindung erfolgreich gestartet
>
> 11:54:41 TCPIP-Verbindung wird versucht (Adresse
> 87.106.28.212:49152 im Cache sasrv.ini gefunden)
>
> 11:54:41 Server wird an der im Cache gespeicherten Adresse
> 87.106.28.212:49152 ohne Broadcast gesucht
> 11:54:41 Server gefunden, Servername wird überprüft
> 11:54:46 Überprüfung des Servernamens fehlgeschlagen.
> 11:54:46 Server mit dem Namen numiganettestremote wird
> gesucht
> 11:54:46 Server wird an der Adresse 87.106.28.212 gesucht
> 11:54:46 Server gefunden, Servername wird überprüft
> 11:54:51 Überprüfung des Servernamens fehlgeschlagen.
> 11:54:51 Broadcast zur Suche nach Servern verwenden
> 11:54:51 Broadcastadresse 10.10.255.255:49152 wird
> verwendet 11:54:51 Broadcastadresse 10.10.255.255:2638
> wird verwendet 11:54:51 Broadcast zur Suche nach Servern
> verwenden 11:54:51 Broadcastadresse 127.255.255.255:49152
> wird verwendet
> 11:54:51 Broadcastadresse 127.255.255.255:2638 wird
> verwendet
> 11:54:51 Broadcast zur Suche nach Servern verwenden
> 11:54:51 Broadcastadresse (ff02::1):49152 wird verwendet
> 11:54:51 Broadcastadresse (ff02::1):2638 wird verwendet
> 11:54:51 Datenbankserver an Adresse 87.106.28.212:49152
> gefunden
> 11:54:51 Datenbankserver numiganettestremote auf
> Verbindung TCPIP gefunden
> 11:54:51 Verbunden unter Verwendung von Clientadresse
> 10.10.10.175:49434
> 11:54:51 Verbunden mit Server über TCPIP an der Adresse
> 87.106.28.212:49152
>
> 11:56:06 Kommunikationsfunktion ApplicationConnect Code 3
> 11:56:06 Client getrennt
> 11:56:06 Verbindung mit dem Server nicht möglich
>
>
> If I create a system dsn on the Computer where the db
> server is running and use the 32 bit SQL Anywhere 10
> driver there, too, testing the ODBC and connecting to the
> DB will work fine.
>
> Because there is a firewall between those two computers I
> made sure that the ports configured for tcpip are open
> (that's why I configured the client ports, too). According
> to the log there seems to be a TCPIP connect to the
> server.
>
> I spotted in the ODBC-log below that an error had occurred
> after SQLDriverConnectW had been called (<Invalid string
> length!>). I assume that that error might be the cause of
> the communication error. Is my assumption correct? What
> could have caused that error and how can it be eliminated?
>
> The ODBC-log reveals the following information:
>
>
> scjview 1538-1434 ENTER SQLAllocHandle
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 00000000
> SQLHANDLE * 03D20F9C
>
> scjview 1538-1434 EXIT SQLAllocHandle with
> return
> code 0 (SQL_SUCCESS)
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 00000000
> SQLHANDLE * 0x03D20F9C ( 0x03b94498)
>
> scjview 1538-1434 ENTER SQLSetEnvAttr
> SQLHENV 03B94498
> SQLINTEGER 200
> <SQL_ATTR_ODBC_VERSION>
> SQLPOINTER 0x00000003
> SQLINTEGER -6
>
> scjview 1538-1434 EXIT SQLSetEnvAttr with
> return
> code 0 (SQL_SUCCESS)
> SQLHENV 03B94498
> SQLINTEGER 200
> <SQL_ATTR_ODBC_VERSION>
> SQLPOINTER 0x00000003 (BADMEM)
> SQLINTEGER -6
>
> scjview 1538-1434 ENTER SQLAllocHandle
> SQLSMALLINT 2 <SQL_HANDLE_DBC>
> SQLHANDLE 03B94498
> SQLHANDLE * 03D20FA0
>
> scjview 1538-1434 EXIT SQLAllocHandle with
> return
> code 0 (SQL_SUCCESS)
> SQLSMALLINT 2 <SQL_HANDLE_DBC>
> SQLHANDLE 03B94498
> SQLHANDLE * 0x03D20FA0 ( 0x047a4888)
>
> scjview 1538-1434 ENTER SQLSetConnectAttr
> SQLHDBC 047A4888
> SQLINTEGER 103
> <SQL_ATTR_LOGIN_TIMEOUT>
> SQLPOINTER 0x00000258
> SQLINTEGER -5
>
> scjview 1538-1434 EXIT SQLSetConnectAttr with
> return code 0 (SQL_SUCCESS)
> SQLHDBC 047A4888
> SQLINTEGER 103
> <SQL_ATTR_LOGIN_TIMEOUT>
> SQLPOINTER 0x00000258 (BADMEM)
> SQLINTEGER -5
>
> scjview 1538-1434 ENTER SQLSetConnectAttrW
> SQLHDBC 047A4888
> SQLINTEGER 1909 <unknown>
> SQLPOINTER [Unknown attribute 1909]
> SQLINTEGER -3
>
> scjview 1538-1434 EXIT SQLSetConnectAttrW
> with return code 0 (SQL_SUCCESS)
> SQLHDBC 047A4888
> SQLINTEGER 1909 <unknown>
> SQLPOINTER [Unknown attribute 1909]
> SQLINTEGER -3
>
> scjview 1538-1434 ENTER SQLDriverConnectW
> HDBC 047A4888
> HWND 00000000
> WCHAR * 0x7043B264 [ -3] <Invalid
> string
> length!>
> SWORD -3
> WCHAR * 0x7043B264
> SWORD -3
> SWORD * 0x00000000
> UWORD 0
> <SQL_DRIVER_NOPROMPT>
>
> scjview 1538-1434 EXIT SQLDriverConnectW with
> return code -1 (SQL_ERROR)
> HDBC 047A4888
> HWND 00000000
> WCHAR * 0x7043B264 [ -3] <Invalid
> string
> length!>
> SWORD -3
> WCHAR * 0x7043B264
> SWORD -3
> SWORD * 0x00000000
> UWORD 0
> <SQL_DRIVER_NOPROMPT>
>
> DIAG [08001] [Sybase][ODBC Driver][SQL
> Anywhere]Verbindungsfehler: Server gefunden, jedoch
> Kommunikationsfehler (-832)
>
> scjview 1538-1434 ENTER SQLErrorW
> HENV 03B94498
> HDBC 047A4888
> HSTMT 00000000
> WCHAR * 0x04B4D564 (NYI)
> SDWORD * 0x04B4D560
> WCHAR * 0x04B4D570
> SWORD 2048
> SWORD * 0x00000000
>
> scjview 1538-1434 EXIT SQLErrorW with return
> code
> 0 (SQL_SUCCESS)
> HENV 03B94498
> HDBC 047A4888
> HSTMT 00000000
> WCHAR * 0x04B4D564 (NYI)
> SDWORD * 0x04B4D560 (-832)
> WCHAR * 0x04B4D570
> SWORD 2048
> SWORD * 0x00000000
>
> scjview 1538-1434 ENTER SQLFreeHandle
> SQLSMALLINT 2 <SQL_HANDLE_DBC>
> SQLHANDLE 047A4888
>
> scjview 1538-1434 EXIT SQLFreeHandle with
> return
> code 0 (SQL_SUCCESS)
> SQLSMALLINT 2 <SQL_HANDLE_DBC>
> SQLHANDLE 047A4888
>
> scjview 1538-1434 ENTER SQLFreeHandle
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 03B94498
>
> scjview 1538-1434 EXIT SQLFreeHandle with
> return
> code 0 (SQL_SUCCESS)
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 03B94498
>
>
> Thanx,
> Stephan
>
>