Network Topology   «Prev  Next»

Lesson 9 Process-level inter-database communication
Objective Establish Net communications at the process level.

Inter-Database Communication in Oracle

The Net listener

At this point, you are ready for an overview of the Net architecture, beginning with a review of the listener.
The Net listener is a process whose job is to receive connection requests on behalf of an application. Listeners are configured to "listen on" an address specified in the listener.ora file for a database or non-database service. Once started, the listener will receive client-connect requests on behalf of a service, and respond by bequeathing the session to a new dedicated server process. The listener process is started on each remote Oracle server with the lsnrctl start UNIX command.
On a UNIX server, you can look at the processes by using the UNIX ps command. View the code below to examine the result.

Process Level 1

Multi-Threaded Server (MTS) desupported

You will only see these server processes when you are not using the Multi-Threaded Server (MTS). With MTS, Oracle has provided a dedicated dispatcher process to manage the database connections. We will cover MTS in the second course in this series.
The code reveals that 10 connections have been bequeathed by the listener, and that there are two databases on this host: CUSTOMER and ORDER. You can also see which connections are originating on the server (LOCAL=YES), and which are coming in from a remote client (LOCAL=NO). We will return to this listing in a later module. Meanwhile, if you have an Oracle UNIX server, try running this command.
Another way to see evidence of these Net connections inside the Oracle system is to look at the v$session and v$process views.
View the Code below to see an example.
Process Level 2

Following is the SQL query that generated the syntax you just looked at:

      substr(a.spid,1,5) pid,
      substr(b.sid,1,5) sid,
      substr(b.serial#,1,5) ser#,
      substr(b.machine,1,6) box,
      substr(b.username,1,10) username,
      substr(b.osuser,1,8) os_user,
      substr(b.program,1,30) program
from v$session b, v$process a
b.paddr = a.addr
and type='USER'
order by spid;

If you have an Oracle server at your site, copy this script and execute it on your server.
Now that we haved seen the processes, in the next lesson we will take a look at how database links are used.