Specifies additional computers outside the immediate network to be searched by the client library.
{ Host | IP }=ip-address
TCP/IP
ip-address This string must be specified in the form of an IP address and it can optionally include a port number (separated by a colon). The list of host values is a comma-separated list. You can use localhost to identify the current computer. For example:
links=tcpip(HOST=myhost) links=tcpip(HOST=myhost:1234) links=tcpip(HOST=10.25.13.5,myotherhost) links=tcpip(HOST=myhost:1234,10.25.65.112) links=tcpip(HOST=myhost:1234,myotherhost:5678) |
No additional computers.
HOST specifies additional computers outside the immediate network to be searched by the client library. For TCP/IP, the address can be the hostname IP address. You may optionally specify a PORT value as well. If a port is specified, only that port number is used for TCP/IP connections and UDP broadcasts. If a port number is not specified, port 2638 is used.
By default, the client does not broadcast to find the server. You can change this behavior by setting the DoBroadcast protocol option to Direct. See DoBroadcast (DOBROAD) protocol option.
When specifying an IPv6 address on a Windows platform, the interface identifier should be used. Unix platforms support both interface identifiers and interface names in IPv6 addresses. The interface identifier is required on Linux (kernel 2.6.13 and later). See IPv6 support in SQL Anywhere.
The server prints addressing information to the database server messages window during startup if the -z option is used. See -z dbeng12/dbsrv12 server option.
In addition, the client application writes this information to its log file if the LogFile connection parameter is specified. See LogFile (LOG) connection parameter.
You can use a comma-separated list of addresses to search for more than one computer. You can also append a port number to
an IP address, using a colon as separator. Alternatively, you can specify the host and server ports explicitly, as in HOST=myhost;PORT=5000
. For IPv6 addresses, you must enclose the address in parentheses, for example (fe80::5445:5245:444f):2638
.
To specify multiple values for a single parameter, use a comma-separated list. IP and HOST are synonyms.
The following connection string fragment instructs the client to look on the computers kangaroo and 197.75.209.222 (port 2369) to find a database server:
LINKS=tcpip(IP=kangaroo,197.75.209.222:2369) |
The following connection string fragment instructs the client to look on the computers my-server and kangaroo to find a database server. A connection is attempted to the first host that responds running on port 2639.
LINKS=tcpip(HOST=my-server,kangaroo;PORT=2639) |
The following connection string fragment instructs the client to look for a server on host1 running on port 1234 and for a server on host2 running on port 4567. The client does not look on host1 on port 4567 or on host2 on port 1234.
LINKS=tcpip(HOST=host1:1234,host2:4567) |
The following connection string fragment instructs the client to look for a server on an IPv6 address:
LINKS=tcpip(HOST=fe80::5445:5245:444f) |
The following examples demonstrate using IPv6 addresses with the Host protocol option:
Global scope address, unique everywhere, so no interface index is required // no index required -c "links=tcpip(Host=fd77:55d:59d9:56a:202:55ff:fe76:df19)" // all communication is done through interface 2 -c "links=tcpip(Host=fd77:55d:59d9:56a:202:55ff:fe76:df19%2)" // all communication is done through eth0 -c "links=tcpip(Host=fd77:55d:59d9:56a:202:55ff:fe76:df19%eth0)" Link scope address, addresses are unique on each interface // possibly ambiguous (this host may exist through both eth0 and eth1) -c "links=tcpip(Host=fe80::202:55ff:fe76:df19)" // not ambiguous because it must use interface 2 -c "links=tcpip(Host=fe80::202:55ff:fe76:df19%2)" // not ambiguous because it must use eth0 -c "links=tcpip(Host=fe80::202:55ff:fe76:df19%eth0)" |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |