Establish Net communications at the process level.
Inter-Database Communication in Oracle
In Oracle Network Services, the 'Net Listener', often referred to as the Oracle listener, operates by default on TCP port 1521. This service is a key component in Oracle's network infrastructure, responsible for listening to incoming client connection requests and managing these requests for the database server.
It's important to note that while 1521 is the default port for the Oracle listener, the exact port can vary depending on your specific configuration. The Oracle listener's port number is defined in the listener.ora configuration file, located in the NETWORK/ADMIN directory under the Oracle home directory.
This file contains entries that define listener names and their associated protocol addresses. An example entry might look something like this:
In this example, the Oracle listener named 'LISTENER' is configured to listen on TCP port 1521 on the host 'localhost'. This configuration can be modified as needed to meet the requirements of your specific network environment.
As with any network service, it's crucial to consider security when configuring the Oracle listener. Ensure that the necessary firewall rules are in place to allow traffic on the configured port, but restrict unauthorized access. Also, consider using Oracle's advanced security options, such as encryption and data integrity checking, to further secure your network communications.
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.
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.
Following is the SQL query that generated the syntax you just looked at:
from v$session b, v$process a
b.paddr = a.addr
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.