Understanding SQL*Net

Contents Glossary Index Home Previous Next

Functions of SQL*Net Version 2

SQL*Net version 2 provides the basis for two complementary means of distributed communications over a network: client-server and server-server computing.

Distributed Processing

In distributed or cooperative processing, clients and servers interact to resolve a single data transaction, even if the applications and databases are separate logical entities, even on separate physical machines. The transaction is distributed between the locations of the client and servers, and the client and servers must cooperate to complete the transaction.

Distributed processing allows the appropriate resources to be allocated from the appropriate machines on the network. The client, for example, can run on a user-friendly graphical workstation or desktop computer while the server resides on a machine more suited for efficient data processing. Distributed processing also allows data processing to be centralized so that many client applications can concurrently access a single server.

SQL*Net in Distributed Processing

SQL*Net is responsible for enabling communications between the cooperating partners in a distributed transaction, either client-server or server-server. Specifically, SQL*Net enables clients and servers to connect to each other, send data such as SQL statements and data responses, initiate interrupts from the client or server, and disconnect when the session is complete. During the life of the connection, SQL*Net resolves all differences between the internal data representations and/or character sets of the computers being used.

When a client or server makes a connection request, SQL*Net receives the request and, if more than one machine is involved, passes the request to its underlying layer, the transparent network substrate (TNS), to be transmitted over the appropriate communications protocol to the appropriate server. On the server, SQL*Net receives the request from TNS and passes it to the database as a network message with one or more parameters (that is, a SQL statement).

With the exception of the initial connection, both the local and remote applications generate the same requests whether they run on the same computer or are distributed across multiple computers. The initial connection differs only in that the name of the remote database must be specified by the application or user.

Figure 1 - 1 shows a local application (on the left), contrasted with a client-server application (on the right). In each case, the application is a SQL*Forms data entry screen.

Figure 1 - 1. Local and Distributed Processing

SQL*Net Functional Benefits

SQL*Net version 2 provides the following benefits to users of networked applications:

Network Transparency

Oracle applications developed with a local database can be distributed across a network to access the same, or a similarly formatted, Oracle database with no changes to the application. SQL*Net is responsible for forwarding application requests for data from an Oracle client or server to a server and returning the results to the initiator of the query. From the application developer's or application user's perspective, all data interaction using SQL*Net is invisible to the user or the application. Additionally, it is possible to change the network structure beneath the application without changing the application. This quality of being invisible is known as network transparency.

Protocol Independence

SQL*Net provides protocol independence to its applications. An application using SQL*Net can run over any network protocol. Any application built on any computer running any protocol can be distributed without change to other computers running other protocols.

Media/Topology Independence

When SQL*Net passes control of a connection to the underlying protocol, all media and/or topologies supported by that network protocol on that platform are indirectly inherited by SQL*Net. SQL*Net allows the network protocol to use any means of data transmission, such as Ethernet, Token Ring, FDDI, or SDLC, to accomplish the low-level data link transmission between the two computers.

Heterogeneous Networking

Oracle's client-server and server-server models provide the capability for connectivity across multiple network protocols, each in a manner appropriate to its function.

Client-Server Configuration

With SQL*Net Version 2, the client and server can belong to different communities connected by one or more MultiProtocol Interchanges. (For information on the MultiProtocol Interchange, see "MultiProtocol Interchange" later in this chapter and refer to the Oracle MultiProtocol Interchange Administrator's Guide). A community is a group of computers that can communicate using the same transport level protocol, such as TCP/IP; that is, computers that share a common protocol are said to be members of the same community. Using an Interchange as an intermediary, applications on the client and server machines can communicate in spite of having no common transport protocol. Any data exchanged in the client-server applications is forwarded through the Interchanges along the path.

Figure 1 - 2 shows a connection between a client and a server running different protocols in adjacent communities. A MultiProtocol Interchange joins the two networks. SQL*Net and an Oracle Protocol Adapter specific to Protocol A are installed on the client, while SQL*Net and an Oracle Protocol Adapter specific to Protocol B are installed on the database server. The Interchange has adapters for both Protocol A and Protocol B.

Figure 1 - 2. Heterogeneous Networking with a client-server Connection

server-server Configuration

In a server-server configuration, this same heterogeneous network capability is extended to include database-to-database communications for distributed queries and updates in Oracle7. Two types of server-server connections are possible using SQL*Net V2:

The example in Figure 1 - 3 shows both types of connections. In this example, Server 1 is a member of two communities, Community A and Community B. A client application in Community A accesses the database server (Server 1) in the same community. Server 1 determines that the transaction must be distributed further to retrieve data from tables in Server 2 and Server 3. Server 1 initiates a connection to Server 2 in Community B to which Server 1 also belongs. Server 1 also initiates a connection to Server 3 through the Interchange installed between Community B and Community C.

Figure 1 - 3. Heterogeneous Networking in a Distributed Database Transaction

Server 1 does not have to use an Interchange to initiate an additional request for data from Community B since it belongs to both Community A and Community B, but it has to use an Interchange to access a server in Community C.

Note that using the Interchange imposes no new restrictions on a SQL*Net connection. If the MultiProtocol Interchange is used in a client-server connection, clients have a standard peer-to-peer connection to the server despite the fact that they are in different communities. Similarly, if a server initiates a connection with another server through an Interchange using a database link, the standard database link restrictions apply.

Location Transparency

The Oracle server provides the means to make data objects such as tables in remote databases look like they are in the local database to an application developer or user of that data object. The database link and synonym database features allow the database in which they are created to identify a remote data object and make the location transparent.

This location transparency removes all references to the location of the data from applications when the synonym is used. Should the location of the remote table move to another machine or database, only the synonym and database link need to be updated to reference the new location; no applications changes are required. (Database links and synonyms are discussed further[*], "Using SQL*Net". Also refer to Oracle7 Server Distributed Systems, Volume I.)

Moreover, if the database link connection is specified as a service name (or symbolic name) in the configuration file (TNSNAMES.ORA), the database links accessing the data do not have to be changed if the remote database is moved; the only update required is to the TNSNAMES.ORA file. Similarly, if Oracle Names or an Oracle Native Naming Adapter is used, only the central network definition needs to be changed.

The network definition, TNSNAMES.ORA, and other configuration files are created using Oracle Network Manager. The configuration files are described in Appendix A, "Contents of the Configuration Files". For detailed instructions on creating the network definition and the configuration files for SQL*Net and other Oracle networking products, see the Oracle Network Manager Administrator's Guide

Note: If you have a network in which all clients and servers use SQL*Net release 2.3, and you use Oracle Names and its Dynamic Discovery Option, minimal configuration files are necessary and you may not need to create a network definition or to use Oracle Network Manager.

Diagnostic Tools

SQL*Net release 2.3 provides a number of diagnostic tools. The diagnostic tools include the following:

These tools are discussed in detail in the Oracle Network Products Troubleshooting Guide.


Contents Glossary Index Home Previous Next