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.

.NET Providor vs ODBC

3 posts in General Discussion Last posting was on 2009-01-14 02:50:47.0Z
John Posted on 2009-01-11 20:37:35.0Z
Sender: 4552.49641a75.1804289383@sybase.com
From: John
Newsgroups: ianywhere.public.general
Subject: .NET Providor vs ODBC
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <496a588f.5e83.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Jan 2009 12:37:35 -0800
X-Trace: forums-1-dub 1231706255 10.22.241.41 (11 Jan 2009 12:37:35 -0800)
X-Original-Trace: 11 Jan 2009 12:37:35 -0800, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7308
Article PK: 5522

When we use .NET Providor without ODBC Data Source, the
Engine Name will be used to locate the Database Server. In a
situation where Database Server is on a different subnet
than the clients and no UDP allowed, how can we use the IP
address of the Database Server. (In ODBC data source we
could give the Host=IP:Port). But we prefer not to use ODBC
and stick with .NET Providor from iAnywhere.

Thank you in advance


Dietrich Posted on 2009-01-12 10:51:41.0Z
Subject: Re: .NET Providor vs ODBC
From: Dietrich <Dietrich@ianywhere.sybase.germany>
Content-Type: multipart/mixed; boundary=----------m0qAlLdKjojANSU4TfD8Ai
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
References: <496a588f.5e83.1681692777@sybase.com>
Message-ID: <op.unm4gik8oacwen@dlauterxp>
User-Agent: Opera Mail/9.63 (Win32)
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 12 Jan 2009 02:51:41 -0800
X-Trace: forums-1-dub 1231757501 10.22.241.152 (12 Jan 2009 02:51:41 -0800)
X-Original-Trace: 12 Jan 2009 02:51:41 -0800, vip152.sybase.com
Lines: 122
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7309
Article PK: 5519

Hi John,

your issue sounds similar to one I had handle last year. So let me try to
answer your question.


First, I wold like to point out, why SQL Anywhre uses the UDP.
- The server uses UDP, as a kind of publishing to tell everyone in the
network that there is a database server available
- The client uses UDP, to retrieve the information from the server on
which port the database server is listing on.

When UDP cannot be used to establish the connection to the database
server, you need to tell the client on which machine the server is running
and on which port the server is listening.

Using the tcpip protocol you can provide the server name and port by using
the parameter LINKS. For example
"LINKS=tcpip(HOST=10.56.33.105;PORT=2638)" would tell the client to
contact the server 10.56.33.105 on port 2638.

A good tool to test out the connection parameter is dbping.


Example
You want to run the sample demo database from SQL Anywhere 10 on machine
XYZ (IP:10.56.33.105). Using the following start line the database server
will start without sending or receiving UDP packages
dbsrv10 -x "tcpip(DOBROADCAST=NO;BLISTENER=NO)" demo
When the database server is the only one on that machine and the port 2638
is free, the server will be listen on port 2638
Better would be to specify the port the server should listen on
dbsrv10 -x "tcpip(PORT=2638;DOBROADCAST=NO;BLISTENER=NO)" demo

You can verify the port used by SQL Anywhere by checking the console
output. You should find something like:
...
Trying to start TCPIP link ...

Starting on port 2638
TCPIP link started successfully

Now accepting requests
...
When the option "-z" has be specified as a start parameter, the output
would look like the following:
...
Trying to start TCPIP link ...

Starting on port 2638
Starting TCP listener on IP address 0.0.0.0:2638
Not performing a broadcast
TCPIP link started successfully

Now accepting requests
...

Next step, verify that the server is available from the client, using for
exmaple the dbping tool.
dbping -d -c
"UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=10.56.33.105;PORT=2638;DOBROADCAST=NONE)"
or
dbping -d -c
"UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=XYZ;PORT=2638;DOBROADCAST=NONE)"

The same parameter can be used in the .NET application using for example:
SAConnection conn = new SAConnection(
"UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=10.56.33.105;PORT=2640;DOBROADCAST=NONE)"
);

You might have been noticed the option "DOBROADCAST=NONE". This is used to
tell the client not to send an UDP package to the server.


I have attached a simple C# application.


Kind regards,

Dietrich

On Sun, 11 Jan 2009 21:37:35 +0100, <John> wrote:

> When we use .NET Providor without ODBC Data Source, the
> Engine Name will be used to locate the Database Server. In a
> situation where Database Server is on a different subnet
> than the clients and no UDP allowed, how can we use the IP
> address of the Database Server. (In ODBC data source we
> could give the Host=IP:Port). But we prefer not to use ODBC
> and stick with .NET Providor from iAnywhere.
> Thank you in advance


John Posted on 2009-01-14 02:50:47.0Z
Sender: 2df2.496d5188.1804289383@sybase.com
From: John
Newsgroups: ianywhere.public.general
Subject: Re: .NET Providor vs ODBC
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <496d5307.2e0a.1681692777@sybase.com>
References: <op.unm4gik8oacwen@dlauterxp>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 13 Jan 2009 18:50:47 -0800
X-Trace: forums-1-dub 1231901447 10.22.241.41 (13 Jan 2009 18:50:47 -0800)
X-Original-Trace: 13 Jan 2009 18:50:47 -0800, 10.22.241.41
Lines: 111
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7310
Article PK: 5520

Dietrich

Many thanks to you. Your answers are very descriptive and
provide all the details that we need.

Thank you again!

> Hi John,
>
> your issue sounds similar to one I had handle last year.
> So let me try to answer your question.
>
>
> First, I wold like to point out, why SQL Anywhre uses the
> UDP. - The server uses UDP, as a kind of publishing to
> tell everyone in the network that there is a database
> server available - The client uses UDP, to retrieve the
> information from the server on which port the database
> server is listing on.
>
> When UDP cannot be used to establish the connection to the
> database server, you need to tell the client on which
> machine the server is running and on which port the
> server is listening.
>
> Using the tcpip protocol you can provide the server name
> and port by using the parameter LINKS. For example
> "LINKS=tcpip(HOST=10.56.33.105;PORT=2638)" would tell the
> client to contact the server 10.56.33.105 on port 2638.
>
> A good tool to test out the connection parameter is
> dbping.
>
>
> Example
> You want to run the sample demo database from SQL Anywhere
> 10 on machine XYZ (IP:10.56.33.105). Using the following
> start line the database server will start without
> sending or receiving UDP packages
> dbsrv10 -x "tcpip(DOBROADCAST=NO;BLISTENER=NO)" demo
> When the database server is the only one on that machine
> and the port 2638 is free, the server will be listen on
> port 2638 Better would be to specify the port the server
> should listen on
> dbsrv10 -x "tcpip(PORT=2638;DOBROADCAST=NO
> ;BLISTENER=NO)" demo
>
> You can verify the port used by SQL Anywhere by checking
> the console output. You should find something like:
> ...
> Trying to start TCPIP link ...
>
> Starting on port 2638
> TCPIP link started successfully
>
> Now accepting requests
> ...
> When the option "-z" has be specified as a start parameter
> , the output would look like the following:
> ...
> Trying to start TCPIP link ...
>
> Starting on port 2638
> Starting TCP listener on IP address 0.0.0.0:2638
> Not performing a broadcast
> TCPIP link started successfully
>
> Now accepting requests
> ...
>
> Next step, verify that the server is available from the
> client, using for exmaple the dbping tool.
> dbping -d -c
> "UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=10.56.33.105
> ;PORT=2638;DOBROADCAST=NONE)" or
> dbping -d -c
> "UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=XYZ;PORT=2638
> ;DOBROADCAST=NONE)"
>
> The same parameter can be used in the .NET application
> using for example:
> SAConnection conn = new SAConnection(
> "UID=dba;PWD=sql;ENG=demo;LINKS=tcpip(HOST=10.56.33.105
> ;PORT=2640;DOBROADCAST=NONE)" );
>
> You might have been noticed the option "DOBROADCAST=NONE".
> This is used to tell the client not to send an UDP
> package to the server.
>
>
> I have attached a simple C# application.
>
>
> Kind regards,
>
> Dietrich
>
> On Sun, 11 Jan 2009 21:37:35 +0100, <John> wrote:
>
> > When we use .NET Providor without ODBC Data Source, the
> > Engine Name will be used to locate the Database Server.
> > In a situation where Database Server is on a different
> > subnet than the clients and no UDP allowed, how can we
> > use the IP address of the Database Server. (In ODBC data
> > source we could give the Host=IP:Port). But we prefer
> > not to use ODBC and stick with .NET Providor from
> > iAnywhere. Thank you in advance
>
>
>
> [Attachment: SA10employees.cs]