Specifies client-side network protocol options.
{ CommLinks | LINKS }={ [ SharedMemory | ShMem ] | ALL | [ TCPIP | TCP ] } [, ... ] string
The CommLinks (LINKS) connection parameter can be used for connections to a network database server and is optional for connections to a personal database server.
It is recommended that you only use the CommLinks (LINKS) connection parameter if you need to specify TCP/IP protocol options other than HOST or ServerPort (PORT). Otherwise, use the Host connection parameter. See Host connection parameter.
You cannot specify both CommLinks and Host in the connection string.
You must use the CommLinks (LINKS) connection parameter if you are using a client library from versions 10.0.0 to 12.0.0 to connect to a database in the cloud, since these client libraries do not support connection redirection.
CommLinks (LINKS) connection parameter values are case insensitive, and include:
SharedMemory (ShMem) Connect using the shared memory protocol for same-computer communication. This is the default setting. The client tries shared memory first if it is included in a list of protocols specified by the CommLinks(LINKS) connection parameter, regardless of the order in which protocols appear.
ALL Attempt to connect using the shared memory protocol first, followed by TCP/IP.
TCPIP (TCP) Connect using the TCP/IP communication protocol. TCP/IP is supported on all operating systems.
You can specify additional network protocol options for TCPIP. See Network protocol options.
SharedMemory
If you do not specify a Host connection parameter or a CommLinks (LINKS) connection parameter, the client searches for a database server on the current computer only, and only using a shared memory connection. This is the default behavior, and is equivalent to CommLinks=ShMem. The shared memory protocol is the fastest communication link between a client and database server running on the same computer, as is typical for applications connecting to a personal database server.
For information about securing shared memory connections on Unix, see Security tips.
If you specify both TCPIP and SharedMemory or CommLinks=ALL, then shared memory is attempted first, followed by TCP/IP if the database server cannot be found over shared memory. For example, in the following connection string, shared memory is attempted first:
"UID=DBA;PWD=sql;Server=demo;DBN=demo;LINKS=TCPIP,SHMEM" |
A personal database server is not started automatically if the Host connection parameter is specified or the CommLinks (LINKS) parameter includes TCP/IP.
The TCP/IP communication protocol is enabled on the database server using the -x option.
The following connection string fragment attempts to connect to the database server named demo running on the current subnet:
CommLinks=tcpip;Server=demo;UID=DBA;PWD=sql; |
The following connection string fragment attempts to connect to the database server named demo. It first attempts to connect over shared memory. If the database server cannot be located using the shared memory, it attempts to connect using TCP/IP.
CommLinks=tcpip,shmem;Server=demo;UID=DBA;PWD=sql |
The following connection string attempts to connect to the server named demo running on the host named kangaroo.
CommLinks=tcpip(HOST=kangaroo);Server=demo;UID=DBA;PWD=sql |
Alternatively, you could use the Host connection parameter to connect to the server named demo running on the host named kangaroo.
Host=kangaroo;Server=demo;UID=DBA;PWD=sql |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |