This section will discuss the core components required to handle Oracle connections.
A Connect Descriptor
A connect descriptor
is used to define the service name and the location of the database.
The address component of a connect descriptor defines the protocol, host
name, and port number. Though port numbers can be between 1 to 65535,
those from 1 to 1024 are usually reserved for special processes. The
default port for Oracle Listener is 1521. The connect data component of
the description describes the service to which you want to connect. If
you do not include the instance_name in your descriptor, it will default
to the Oracle SID.
A sample connect descriptor for customer.us.beginner.com looks like the following:
(DESCRIPTION =
(ADDRESS=(PROTOCOL=tcp)(HOST=eclipse)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=customer.us.beginner.com)))
A specific connect descriptor can be defined for a
specific service handler. For example, in a shared server architecture, a
dedicated service handler can be chosen, which can be set to dedicated
(SERVER=dedicated) or shared (SERVER=shared). If no dispatchers are
available, a dedicated server will be used and the default service
handler is shared:
(DESCRIPTION =
(ADDRESS=(PROTOCOL=tcp)(HOST=eclipse)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=customer.us.beginner.com)
(SERVER=dedicated)))
Define a Connect Descriptor
When establishing a connection, you have two choices:
a detailed connect descriptor can be defined or a manual name that maps
to a connect descriptor can be used. The following example shows you
how to define a manual connect descriptor or name a connection
descriptor name:
-- Manual definition of a connection descriptor
CONNECT
username/password@(DESCRIPTION = (ADDRESS=(PROTOCOL=tcp) (HOST=eclipse)
(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=customer.us.beginner.com)))
-- Connect using a pre-defined descriptor
CONNECT username/password@cust
The Oracle Connection Manager
The Oracle Connection Manager
processes and filters requests to the database server. It can also
optimize network performance for a large number of sessions. Figure 1 illustrates the various layers between the users and the database that need to be controlled by the manager.
The Oracle Connection Manager Control utility allows administration of the Oracle Connection Manager. The syntax is
cmctl {command} [parameter1 ... parameterN] {-c instance_name}
{-p password}
Connection Manager commands can be executed from within the utility, as shown here:
cmctl
CMCTL> startup –c cman0
The Oracle Connection Manager can offload network I/O from the application servers.
We
will now move on and look at the Oracle Connection Manager options to
include session multiplexing and firewall access control.
Session Multiplexing
The Oracle Connection Manager allows a number of
different client network sessions to be shared (multiplexed) through a
single network connection to the database server. Multiplexing sessions
increases the number of network sessions that can be supported.
Similarly, multiple Connection Managers can be used to handle hundreds
or thousands of concurrent users; they run on the application server
platform in order to multiplex sessions to the Oracle database server.
Firewall Access Control
The Oracle Connection Manager can define
filtering rules to grant or deny access to the database server; this is
done via the Oracle Net Firewall Proxy. The Oracle Net Firewall Proxy is
software that provides Oracle Connection Manager features through
different firewall vendors.