Local-loopback connections

A network connection between a client application and a database server on the same computer is called a local-loopback connection.

The networking facilities used are the same as if the client application and the database server were on different computers. You can make a local-loopback connection provided your computer is equipped to process network transactions. Local-loopback connections are not as fast as shared-memory connections, but they do not pose the security risks of shared memory.

In a local-loopback connection, data seems to pass from the client application, out to the network, and then back in again to the database server. The internal connection processes send the information directly between the client and the database server and do not put the information out on the network.

An example of a local-loopback connection

The following figure shows a local-loopback connection that uses sockets and TCP/IP.
Figure 1: A local-loopback connection between a client and a database server named river_soc on a computer named river.

This figure shows a client application and a database server named river_soc that are connected through a TCP/IP programming interface.
The sqlhosts file for this installation includes the following lines:
#dbservername   nettype   hostname   servicename   options
 river_soc      onsoctcp  river      riverol
If the network connection uses TLI instead of sockets, only the nettype entry in this example changes. In that case, the nettype entry is ontlitcp instead of onsoctcp.
The onconfig file for this installation includes the following lines:
DBSERVERNAME river_soc

This example assumes that an entry for river is in the hosts file and an entry for riverol is in the services file.