DBA UNIT 3 Oracle Net
DBA UNIT 3 Oracle Net
Learning Objectives:
3
Network configurations:
Oracle infrastructure:
• Single-tier
• Two-tier
• n-tier
4
Lecture Objectives:
The user PC makes a direct connection (using tools like Putty) to the database
server to use the database (using tools like SQL*Plus).
5
6
SCALE UP
FLEXIBILITY
ROBUST
7
n-Tier Architecture
• Moving data between machines that work with different network protocols
• Serving as firewalls that can control client access to the servers
• Offloading processing of the business logic from the clients and servers to the
middle tier
• Executing transactions and monitoring activity between clients and servers to
balance the load among multiple servers
• Acting as a gateway to bridge existing systems to new systems
8
Oracle Net Features
Oracle Net is the glue that bonds the Oracle network together.
It is responsible for handling client-to-server and server-to-server
communications.
it can be configured on the client, the middle-tier application, web servers,
and the Oracle server.
Oracle Net manages the flow of information in the Oracle network
infrastructure.
9
Oracle Net Features
10
Oracle Net Features
11
Oracle Net Features
12
Oracle Net Features
1. The JDBC OCI driver is a client-side installed driver that is used if the
Java application is
2. resident on a client computer. It uses OCI to interact with the Oracle Net
infrastructure. 13
Oracle Net Features
14
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Manageability
15
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Connectivity
Manageability
Scalability
Security
Accessibility
16
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Scalability
Oracle Net provides features that allow to expand network reach and maximize
system resources.
Connection Manager
17
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Scalability
Oracle Net provides features that allow to expand network reach and maximize
system resources.
19
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Connectivity
Manageability
Scalability
Security
Accessibility
20
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Scalability
Connection Manager
Oracle Connection Manager is a middleware solution that provides three
additional scalability features.
It usually resides on a computer separate from the database server and client
computers.
Oracle Connection Manager is a proxy server that forwards connection
requests to databases or other proxy servers.
To a user running Oracle Net, the Connection Manager looks like a database
server.
21
22
Oracle Net Features
Scalability
Connection Manager
1. Multiplexing: It can group many client connections and send them as a
single multiplexed network connection to the Oracle server. This reduces the
total number of network connections that the server has to manage.
2. Network Access You can configure Connection Manager with rules that
restrict access by IP address. You can set up this rules-based configuration to
accept or reject client connection requests.
3. Cross-Protocol Connectivity This feature allows clients and servers that use
different network protocols to communicate. Connection Manager acts as a
translator, providing two-way protocol conversion.
23
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Connectivity
Manageability
Scalability
Security
Accessibility
24
Security
• Advanced Security
• Firewall Support
25
Security
• Advanced Security
• Firewall Support
Firewall Support
Firewalls are generally a combination of hardware and software that is used to
control network traffic and prevent intruders.
IP-Filtering Firewalls: monitor the network packet traffic on IP networks and filter
out packets that either originated or did not originate from specific groups of
machines.
IP packet header
Proxy-Based Firewalls: prevent information from outside the firewall from flowing
directly into the corporate network.
Gatekeeper
-inspects packets and sends only the appropriate information to the
corporate network.
This prevents any direct communication between clients outside the firewall
and applications inside the firewall.
26
Oracle Net Features
5 categories of networking solutions that Oracle Net addresses:
Connectivity
Manageability
Scalability
Security
Accessibility
27
Accessibility
Oracle Net have capabilities that allow you to communicate with
non-database data sources.
Heterogeneous Services
The Heterogeneous Services component provides the ability to communicate
with non-Oracle databases and services.
External Procedures
Interfacing with procedures that reside outside the database may be
necessary.
typically written in C.
Oracle Net provides the ability to invoke such external procedures from
Oracle PL/SQL callouts.
This callout process defaults to the name extproc.
28
29
Oracle Dedicated Vs. Shared Server
• Shared server allows the server to support a larger number of concurrent
connections without increasing physical resource.
30
Oracle Dedicated Vs. Shared Server
• A dedicated server environment: Every client connection is associated with
a dedicated server process (shadow process), on the machine where the
Oracle server exists.
• Dispatcher processes are responsible for servicing client requests.
• These processes are capable of handling requests from many clients.
31
32
Processing steps for a Shared Server request:
1. The client passes a request to the dispatcher serving it.
2. The dispatcher places the request on a request queue in the SGA.
3. One of the Shared Server processes executes the request.
4. The Shared Server places the completed request on the
dispatcher’s response queue of the SGA.
5. The dispatcher picks up the completed request from the response
queue.
6. The completed request is passed back to the client.
33
Connection method:
There are also two types of connection methods when using Oracle
Dedicated/Shared Server -- Direct Handoff and Redirect.
34
Connection method:
Dedicated Connections: Direct Handoff Method
Direct handoff connections are possible when the client and database
exist on the same server.
1. The client contacts the Oracle listener after resolving the service
name.
2. The listener starts a dedicated process, and the client connection
inherits the dedicated server-process network-connect end point
from the listener.
3. The client now has an established connection to the dedicated
server process.
35
36
Connection method:
Dedicated Connections: Redirect Method
The listener inform the client of the address of the spawned process.
1. The client contacts the Oracle listener after resolving the service
name.
2. The listener starts a dedicated process.
3. The listener sends an acknowledgment back to the client with the
address of the dedicated-server-connect end point on the
database server to which the client will connect.
4. The client establishes a connection to the dedicated-server-
connect end point.
37
38
Connection method:
Oracle Shared Server: Direct Handoff Method
1. The client contacts the Oracle listener after resolving the service
name.
2. The Oracle listener passes the connection request to the
dispatcher with least load.
3. The client now has an established connection to the dispatcher
process.
4. LREG (process monitor) sends information to the listener about the
number of connections being serviced by the dispatchers.
39
40
Connection method:
Oracle Shared Server: Redirect Method
1. The client contacts the Oracle server after resolving the service
name.
2. The listener sends information to the client, redirecting the client
to the dispatcher port. The original network connection between
the listener and the client is disconnected.
3. The client then sends a connect signal to the server or dispatcher
process to establish a network connection.
4. The dispatcher or server process sends an acknowledgment to the
client.
41
Connection method:
Oracle Shared Server: Redirect Method
5. LREG sends information to the listener about the number of
connections being serviced by the dispatchers. The listener uses
this information to maintain consistent loads between the
dispatchers.
42
43
Connection method:
Oracle Shared Server: Direct Handoff Method
1. The client contacts the Oracle listener after resolving the service
name.
2. The Oracle listener passes the connection request to the
dispatcher with least load.
3. The client now has an established connection to the dispatcher
process.
4. LREG (process monitor) sends information to the listener about the
number of connections being serviced by the dispatchers.
44
Database Resident Connection Pooling
For DRCP, the connection request typically originates from the
application server.
1. The client (or middle-tier application) contacts the Oracle server
after resolving the service name.
2. The listener sends information to the client, redirecting the client
to the DRCP connection broker.
3. When an application wants to communicate with the database, the
pooled-server process connection to the connection broker is
handed off to the client.
45
Database Resident Connection Pooling
46
47
Understanding Database Resident Connection Pooling
1. Oracle Database 11g to address scalability requirements
2. Large numbers of connections to the database with minimal
resource usage.
3. DRCP has a set of dedicated database server processes known as
pooled servers that can be shared across multiple applications.
4. Pooled server = server process + database session.
5. It allows multiple Oracle clients to share a server side pool of
sessions.
48
Understanding Database Resident Connection Pooling
6. To share the pool, the user ID must be the same. Clients can
connect and disconnect without the overhead of creating a new
server side session.
7. DRCP is most suitable for applications that connect and disconnect
frequently, but use the same database credentials for all
connections—like most PHP applications
8. After the request is finished, the server process is released into the
pool.
49
Thank You