Beruflich Dokumente
Kultur Dokumente
htm; Updated July 14, 2013; Some figures in these notes are from the Oracle Database Net Services Administrator's Guide 11g Release 2
(11.2) E10836-07
An E-Commerce Architecture
This figure shows a typical Internet architecture.
The organization has an Intranet that connects client computers to one or more Database Servers.
The client computers also connect to the Internet through an Application Web Server.
pdfcrowd.com
Oracle Net
Oracle Net Services is Oracle's solution for providing enterprise wide connectivity in distributed,
heterogeneous computing environments.
Objective is for Oracle Net Services to make it easy to manage network configurations while
maximizing performance and enabling network diagnostic capabilities when problems arise.
Connectivity is provided by Oracle Net.
o Oracle Net is a component of Oracle Net Services and is the software that enables a connection
from a client application to an Oracle database server.
o Oracle Net maintains the connection and exchanges messages between client and server
computers.
open in browser PRO version
pdfcrowd.com
pdfcrowd.com
This figure shows a client using a Web Browser such as Internet Explorer with a JDBC Thin driver that
uses a Java version of Oracle Net called JavaNet to communicate with the Oracle database server that is
configured with Oracle Net.
pdfcrowd.com
Location Transparency
Many companies have more than one databases, often distributed, that support different client
applications.
Each database is represented in Oracle Net by one or more services.
Service identified by a service name.
Client computers use the service name to identify the database to be accessed.
The information about the database service and its location in the network is transparent to the client
because the information needed for a connection is stored in a repository.
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
Oracle Net and Oracle software are scalable meaning that an organization can maximize the use of
system resources. One way this is done is through a shared server architecture that allows many client
computers to connect to a server.
open in browser PRO version
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
Client computers are configured with protocol addresses that enable them to send connection
requests to a listener.
After a connection is established, the client computer and Oracle Database Server communicate
directly.
pdfcrowd.com
For example, one service might be dedicated to system users accessing financial data while another
one is dedicated to system users accessing warehouse data.
Using more than one service can enable a DBA to allocate system resources.
Service Name:
Each database service is identified by a service name.
SERVICE_NAMES init.ora parameter specifies the service name in the databases initialization
parameter file.
The service name defaults to a global database name when it is not specified this is a name that
comprises the database name from the DB_NAME parameter and the domain name from the
DB_DOMAIN parameter.
The SERVICE_NAMES parameter in the initialization parameter file (init.ora) can specify more than
one service entry as shown below.
o This enables a single instance to be identified in different ways by different client computers.
o This also enables a DBA to limit resource allocations for clients requesting a service.
SERVICE_NAMES = sobora1.siue.edu, sobora2.siue.edu
This enables using a pool of Multi-threaded service dispatchers to be used for clients requesting
sobora1.siue.edu, for example, while a different dispatcher or pool of dispatchers could be
configured to service sobora2.siue.edu, for example.
Instance Name:
Each database instance is identified by an instance name.
INSTANCE_NAME parameter in the initialization parameter file specifies the instance name.
The instance name defaults to the Oracle System Identifier (SID).
This figure shows two database servers, each connected to a single database that is opened as two
open in browser PRO version
pdfcrowd.com
separate instances, each with a unique parameter file called an instance parameter file (ifile).
Accessing a Service
Client computers connect to a database service by using a connect descriptor.
open in browser PRO version
pdfcrowd.com
The connect description describes the database location and database service name.
Example for a database service named sobora2.
DBORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu )(PORT = 1521)
)
)
(CONNECT_DATA = (SID=DBORCL)
(SERICE_NAME=DBORCL.siue.edu)
)
)
ADDRESS= clause specifies the protocol address of the listener service.
Includes the HOST= specification of the database server (the specification can be the database
name, e.g., sobora2.siue.edu or the IP address, e.g. 146.163.252.41).
Includes the PROTOCOL= specification for the network protocol (TCP).
Includes the PORT= specification the standard listener port is 1521 for Oracle software other
ports can be used as long as no other service is using the port on the server an alternative port,
such as 1523 could be assigned if port 1521 was already in use for another service on the host.
pdfcrowd.com
pdfcrowd.com
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT=1521))
)
(CONNECT_DATA=(SERVICE_NAME=DBORCL)
(SERVER=shared)
)
)
This figure shows more detail with a Listener and a Dispatcher for a Shared Server Process.
The Listener hands the connection request to the Dispatcher for future communcation. The steps
are:
1. The listener receives a client connection request.
2. The listener hands the connect request directly to the dispatcher.
3. The client is now connected to the dispatcher.
pdfcrowd.com
This figure shows more detail with a Listener for a Dedicated Server Process.
The Listener passes a connection request to a dedicated server process -- first it starts the process.
The steps are:
1. The listener receives a client connection request.
2. The listener starts a dedicated server process.
3. The listener provides the location of the dedicated server process to the client in a redirect message.
4. The client connects directly to the dedicated server.
open in browser PRO version
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
Provides a wizard interface that prompts for information needed to build a tnsnames.ora file
automatically.
If you select Custom Installation as an option when configuring your network connection, you can
select the naming method to use.
If you select Directory Naming or any other method other than Local Naming, the naming method has
to already be set up.
You can also configure the tnsnames.ora file manually by adding service names to the file by using a
simple text editor like Notepad.
pdfcrowd.com
pdfcrowd.com
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SID = DBORCL)
)
)
EMTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sobora2.isg.siue.edu)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = EMTEST.siue.edu)
)
)
LISTENER_DBACLASS =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 146.163.252.41)(PORT = 1523))
)
The LISTENER_DBACLASS alias specified above can be used to enable any Oracle software to
connect to a student database through the listener.
The LOCAL_LISTENER parameter shown below is from the dbockstd (student database)
initdbockstd.ora file. It specifies the alias for the listener used to connect to this particular
database.
open in browser PRO version
pdfcrowd.com
###########################################
# Listener alias
###########################################
local_listener = "LISTENER_DBACLASS"
Listener Control Utility.
A configured listener can be managed with the Listener Control Utility (LSNRCTL).
Ensure software release of the listener is appropriate for the Oracle database software release, e.g.,
use a listener designed for Oracle 11g, 10g or 9i as appropriate.
The screen shot below gives an example of using the lsnrctl command in a LINIX environment.
dbock/@sobora2.isg.siue.edu=>lsnrctl
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 22JUL-2009 11:12:36
Copyright (c) 1991, 2007, Oracle.
pdfcrowd.com
pdfcrowd.com
pdfcrowd.com
When a listener service is contacted by a client, one of these actions is performed as is shown in this
figure.
pdfcrowd.com
If the database service is running a dispatcher service, then the listener hands the request to the
dispatcher the process that manages the connection of many clients to the same server in a multithreaded server environment.
If a dispatcher is not in use, the listener can spawn a dedicated server process or allocate a prespawned dedicated server process and pass the client connection to this dedicated server process
(one server per client as we have discussed in earlier lectures).
Either way, a redirect message is sent back to the client informing the client of the location of the
dispatcher or dedicated server process.
pdfcrowd.com
If a user or application requests disconnection from a server, the server disconnects when all
transactions are complete. If this server is connected to a second server in order to support the
user/application, then these additional connections are also disconnected.
Additional Connection Request. When an application is connected to a server and attempts to access
another user account (same or different server), the application is usually disconnected from the current
connection.
Abnormal Connection Termination. If communications are aborted without Oracle Net being notified,
Oracle Net will recognize the failure and eventually clean up the client/server operations (during the next
data operation) and disconnect the operation.
Timer Initiated Disconnect or Dead Connection Detection. This feature is enabled to minimize
wasted resources by invalid connections. Uncommitted transactions are automatically rolled back and
locks are released for the broken connection. Oracle detects dead connections by periodically sending a
small probe packet to each client at a user-defined interval (several minutes is typical) and initiates the
disconnection through the allocated Server process if the connection is invalid.
pdfcrowd.com
END OF NOTES.
pdfcrowd.com