Home > Archive > SQL Anywhere database > June 2005 > Shared Memory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Shared Memory
Ted

2005-06-16, 9:23 am

Hello all.

I've tried to find this answer completely spelled out in documentation, but
have failed. I need to know if I have an SQL Anywhere server engine and
client (version 7.0.3.2046) running on the same WinXP PC, does that client
connect using the SharedMemory link (I've always assumed it does)? And does
that client send a broadcast across the network to find that server?

TIA,

Ted


Joshua Savill

2005-06-16, 9:23 am

Ted,

The client, when attempting to connect to the database server, will do a UDP
packet local subnet broadcast to attempt to obtain the IP Address of the
database server. If the database server is not running on the same local
subnet, without specifying HOST= in the connection parameters, the database
server will not be found. The database server upon start up will do a
broadcast to ensure the it is the only database server starting with the
specified server name.

If the client is running locally on the same machine as the database server,
using an ODBC connection by default will connect via Shared Memory. This can
be altered either using the connection parameters or through the DSN.

This is the version 9 documentation for connections parameters and
connecting to the database. Most apply to version 7:

http://www.ianywhere.com/developer/...n9/00000228.htm
http://www.ianywhere.com/developer/...n9/00000059.htm


Version 7 manuals can be found here:
http://www.ianywhere.com/developer/...here/index.html

--
Joshua Savill
iAnywhere Solutions - Product Support Analyst

"Ted" < tfruchtl@consolidate
d.net> wrote in message
news:42b180b4$2@foru
ms-1-dub...
> Hello all.
>
> I've tried to find this answer completely spelled out in documentation,
> but have failed. I need to know if I have an SQL Anywhere server engine
> and client (version 7.0.3.2046) running on the same WinXP PC, does that
> client connect using the SharedMemory link (I've always assumed it does)?
> And does that client send a broadcast across the network to find that
> server?
>
> TIA,
>
> Ted
>



Greg Fenton

2005-06-16, 9:23 am

Ted wrote:
> I've tried to find this answer completely spelled out in documentation, but
> have failed. I need to know if I have an SQL Anywhere server engine and
> client (version 7.0.3.2046) running on the same WinXP PC, does that client
> connect using the SharedMemory link (I've always assumed it does)? And does
> that client send a broadcast across the network to find that server?


This depends on a few factors:

1. Is the server running with ShMem enabled? (it does by default)
2. What are the client connection parameters?

If your client is told to communicate via TCPIP only, then the client
won't use ShMem. However, if you do not specify the communication
links, then the client will attempt a ShMem connection before any other
types (as it is extremely fast to determine if a ShMem link can be
established).

If a ShMem link can be established, then no broadcast is done.

BTW: the documentation about how client connections are established has
been improved since version 7.x docs (which are now 5 years old). The
9.x docs are still relevant, so you might wish to read in the 9.x docs:

ASA Database Administration Guide
Connecting to a Database
- Troubleshooting connections

or

http://tinyurl.com/79eeo [shortcut to docs on ianywhere.com]

Start with that page and use the "Next" button to walk through the
entire process. The most telling of these pages is the diagram on:

ASA Database Administration Guide
Connecting to a Database
Troubleshooting connections
- Locating a server

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Graeme Perrow

2005-06-16, 1:23 pm

Joshua Savill wrote:
> The client, when attempting to connect to the database server, will do a UDP
> packet local subnet broadcast to attempt to obtain the IP Address of the
> database server. If the database server is not running on the same local
> subnet, without specifying HOST= in the connection parameters, the database
> server will not be found. The database server upon start up will do a
> broadcast to ensure the it is the only database server starting with the
> specified server name.


Just to clarify, the client does the UDP broadcast only if "LINKS=tcpip"
is included in the connection string or DSN.

The simple answer to the original question is that the client uses the
LINKS parameter to decide what protocol(s) to use to find the server.
The default value of LINKS is "SharedMemory", so unless you specifically
tell the client to use a different protocol, you will be using shared
memory.

--
Graeme Perrow
Senior Software Developer
gperrow _at_ ianywhere _dot_ com
iAnywhere Solutions Inc.
A Sybase company

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer/
Ted

2005-06-17, 11:24 am

You guys are on your game. Thank you very much for this information. To
answer Greg's two questions, yes ShMem is enabled (we are not disabling it).
We do force the client to connect via TCPIP, even on the local clients.


"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:42b1908e$1@foru
ms-2-dub...
> Ted wrote:
>
> This depends on a few factors:
>
> 1. Is the server running with ShMem enabled? (it does by default)
> 2. What are the client connection parameters?
>
> If your client is told to communicate via TCPIP only, then the client
> won't use ShMem. However, if you do not specify the communication links,
> then the client will attempt a ShMem connection before any other types (as
> it is extremely fast to determine if a ShMem link can be established).
>
> If a ShMem link can be established, then no broadcast is done.
>
> BTW: the documentation about how client connections are established has
> been improved since version 7.x docs (which are now 5 years old). The 9.x
> docs are still relevant, so you might wish to read in the 9.x docs:
>
> ASA Database Administration Guide
> Connecting to a Database
> - Troubleshooting connections
>
> or
>
> http://tinyurl.com/79eeo [shortcut to docs on ianywhere.com]
>
> Start with that page and use the "Next" button to walk through the entire
> process. The most telling of these pages is the diagram on:
>
> ASA Database Administration Guide
> Connecting to a Database
> Troubleshooting connections
> - Locating a server
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/



Ted

2005-06-17, 11:24 am

Sorry, sent before I was ready. Now, while the server engine is running,
does it continually send out broadcasts or is it only when the server
starts?

Again, thanks a bunch!

Ted

"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:42b1908e$1@foru
ms-2-dub...
> Ted wrote:
>
> This depends on a few factors:
>
> 1. Is the server running with ShMem enabled? (it does by default)
> 2. What are the client connection parameters?
>
> If your client is told to communicate via TCPIP only, then the client
> won't use ShMem. However, if you do not specify the communication links,
> then the client will attempt a ShMem connection before any other types (as
> it is extremely fast to determine if a ShMem link can be established).
>
> If a ShMem link can be established, then no broadcast is done.
>
> BTW: the documentation about how client connections are established has
> been improved since version 7.x docs (which are now 5 years old). The 9.x
> docs are still relevant, so you might wish to read in the 9.x docs:
>
> ASA Database Administration Guide
> Connecting to a Database
> - Troubleshooting connections
>
> or
>
> http://tinyurl.com/79eeo [shortcut to docs on ianywhere.com]
>
> Start with that page and use the "Next" button to walk through the entire
> process. The most telling of these pages is the diagram on:
>
> ASA Database Administration Guide
> Connecting to a Database
> Troubleshooting connections
> - Locating a server
>
> Hope this helps,
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/



Mark Culp

2005-06-17, 1:23 pm

The server only sends out broadcasts for the first 5 seconds (one per second)
to determine if there is another server with the same name already running.
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------

Ted wrote:[color=darkred
]
>
> Sorry, sent before I was ready. Now, while the server engine is running,
> does it continually send out broadcasts or is it only when the server
> starts?
>
> Again, thanks a bunch!
>
> Ted
>
> "Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
> news:42b1908e$1@foru
ms-2-dub...
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com