A single instance of the database server can provide more
than one type of connection.
The following figure illustrates a configuration with more than
one type of connection. The database server is on host river.
Client A connects to the database server with a shared-memory connection
because shared memory is fast. Client B must use a network connection
because the client and server are on different computers.
When you want the database server to accept more than one type
of connection, you must take the following actions:
Add DBSERVERNAME and DBSERVERALIASES entries in the onconfig file.
Add an sqlhosts entry for each database server/connection
type pair.
For the configuration in the following figure, the database server
has two dbserver names: river_net and river_shm. The onconfig file
includes the following entries:
DBSERVERNAME river_net
DBSERVERALIASES river_shm
Figure 1: An example of a UNIX™ client/server configuration that uses multiple
connection types
The dbserver name used by a client application determines the type
of connection that is used. Client A uses the following statement
to connect to the database server:
CONNECT TO '@river_shm'
In the sqlhosts file, the nettype associated
with the name river_shm specifies a shared-memory connection,
so this connection is a shared-memory connection.
Client B uses the following statement to connect to the database
server:
CONNECT TO '@river_net'
In the sqlhosts file, the nettype value
associated with river_net specifies a network (TCP/IP) connection,
so Client B uses a network connection.