Specifies additional computers outside the immediate network to be searched by the client library.
TCP/IP
String
No additional computers.
HOST specifies additional computers outside the immediate network to be searched by the client library. On the server, the search is performed to avoid starting a server with a duplicate name. Specifying a host in the HOST protocol option does not mean that the database server must be running on a specified hosts.
For TCP/IP, the address can be the hostname IP address. You may optionally specify a PORT value as well.
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. In addition, the client application writes this information to its log file if the LogFile connection parameter is specified.
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. When you specify multiple ports and servers, you can associate a particular port with a specific server by specifying the port in the HOST (IP) protocol option instead of the PORT parameter.
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. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |