Monday, November 7, 2011

oracle 9i shared server

Oracle 9i Shared Server nasıl çalışıyor.
 
1. Dispatcher tanımı gerekiyor.
Sessionlar  öncelikle bir listener’a bağlanıyorlar. Burada  client’ın tnsnames.ora sında SERVER=shared olmalı.
 
If shared server is configured and a client connection request arrives when no
dispatchers are registered, the requests can be handled by a dedicated server
process (configured in the listener.ora file). If you want a particular client
always to use a dispatcher, configure (SERVER=shared) in the connect data
portion of the connect descriptor. For example:
Configuring Shared Server 14-9 – net service qadministrator guide
sales=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com)
(SERVER=shared)))
 
Bu listener’da bu connection’ı Dispacther’a yönlendiriyor.
Dispatcher’da istekleri Shared serverlara circuit olarak koyuyor. Boş bir shared server işi alıp yapıp tekrar sonucu dispatcher’a dönüyor. Dispatcher’da client’a dönüyor.
Tanımlar şöyle oluyor.
 
Registering Information with a Nondefault Listener
If you want PMON to register with a local listener that does not use TCP/IP, port
1521, configure the LOCAL_LISTENER parameter in the initialization parameter file
to locate the local listener.
For a shared server environment, you can alternatively use the LISTENER attribute
of the DISPATCHERS parameter in the initialization parameter file to register the
dispatchers with a nondefault local listener. Because both the LOCAL_LISTENER
parameter and the LISTENER attribute enable PMON to register dispatcher
information with the listener, it is not necessary to specify both the parameter and
the attribute if the listener values are the same.
See Also: Oracle9i Database Reference for further information about
the SERVICE_NAMES and INSTANCE_NAME parameters
Configuring Service Registration
12-16 Oracle9i Net Services Administrator’s Guide
Set the LOCAL_LISTENER parameter as follows:
LOCAL_LISTENER=listener_alias
Set the LISTENER attribute as follows:
DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener_alias)"
listener_alias is then resolved to the listener protocol addresses through a
naming method, such as a tnsnames.ora file on the database server.
For example, if the listener is configured to listen on port 1421 rather than port 1521,
you can set the LOCAL_LISTENER parameter in the initialization parameter file as
follows:
LOCAL_LISTENER=listener1
Using the same listener example, you can set the LISTENER attribute as follows:
DISPATCHERS="(PROTOCOL=tcp)(LISTENER=listener1)"
You can then resolve listener1 in the local tnsnames.ora as follows:
listener1=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1421)))
Notes:
n To dynamically update the LOCAL_LISTENER parameter, use
the SQL statement ALTER SYSTEM SET:
ALTER SYSTEM SET LOCAL_LISTENER=’listener_alias’
If you set the parameter to null with the statement that follows,
then the default local address of TCP/IP, port 1521 is assumed.
ALTER SYSTEM SET LOCAL_LISTENER=’’
See the Oracle9i SQL Reference for further information about the
ALTER SYSTEM SET statement.
n The LISTENER attribute overrides the LOCAL_LISTENER
parameter. As a result, the SQL statement ALTER SYSTEM SET
LOCAL_LISTENER does not affect the setting of this attribute.
Configuring Service Registration
Configuring and Administering the Listener 12-17
To register information with another local listener:
1. Configure the listener.ora file with the protocol address of the local
listener.
2. Configure the LOCAL_LISTENER parameter in the initialization parameter file
to locate the local listener. If you are using shared server, you can also use the
LISTENER attribute of the DISPATCHERS parameter in the initialization
parameter file.
3. Resolve the listener name alias for the LOCAL_LISTENER or the LISTENER
setting through a tnsnames.ora file or an Oracle Names server.
 
 
DB açıldığı zaman DISPATCHER’daki listener parametresine bakıyor. Buradaki değeri alıp tnsnames.ora ‘ya bakıyor . Buradaki IP ve PORT ‘u alıyor. Sonra bu IP+PORT’u dinleyen listener’ı buluyor. Bu listener’a diyorki. Kardeş ben dispatcher lar açtım. Bunların parametreleri falan falan
Artık sana SERVER=shared gelenleri bu dispatcher’a gönder diyor.
 
Bu listener’ın özelliği listener.ora’da tanımlı olması  ama sadece TCP/IP protokol adreslerinin olması.
Service vereceği yerlerin olmamasıdır. Service vereceği yer Dynamic registration ile halledilmektedir.
Bu kısmına gerek yoktur.
 
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=sales.us.acme.com)
(ORACLE_HOME=/oracle9i)
(SID_NAME=sales))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/oracle9i)
(PROGRAM=extproc)))
A listener is configured with one or more listening protocol addresses, information
about supported services, and parameters that control its runtime behavior. The
listener configuration is stored in a configuration file named listener.ora.
Because all of the configuration parameters have default values, it is possible to
start and use a listener with no configuration. This default listener has a name of
LISTENER, supports no services upon startup, and listens on the following TCP/IP
protocol address:
(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))
Supported services, that is, the services to which the listener forwards client
requests, can be configured in the listener.ora file or this information can be
dynamically registered with the listener. This dynamic registration feature is called
service registration and is used by Oracle9i or Oracle8i instances. The registration is
performed by the PMON process—an instance background process—of each
database instance that has the necessary configuration in the database initialization
parameter file. Dynamic service registration does not require any configuration in
the listener.ora file.
Note: A version 9 listener is required for an Oracle9i database.
Previous versions of the listener are not supported for use with an
Oracle9i database. However, it is possible to use a version 9 listener
with previous versions of the Oracle database.
See Also: "Listener Architecture" on page 4-10
Listener Configuration Overview
Configuring and Administering the Listener 12-3
Service registration offers the following benefits:
n Simplified configuration
Service registration reduces the need for the SID_LIST_listener_name
parameter setting, which specifies information about the databases served by
the listener, in the listener.ora file.
n Connect-time failover
Because the listener always knows the state of the instances, service registration
facilitates automatic failover of the client connect request to a different instance
if one instance is down.
In a static configuration model, a listener would start a dedicated server upon
receiving a client request. The server would later find out that the instance is
not up, causing an "Oracle not available" error message.
n Connection load balancing
Service registration enables the listener to forward client connect requests to the
least loaded instance and dispatcher or dedicated server. Service registration
balances the load across the service handlers and nodes.
Oracle Enterprise Manager tools require static service configuration in the
listener.ora file.
 
 
Shraed Server ile igili tanımları DB admin guiden da ve Net service admin guiden da detaylı bulabilirsin.
Bunları okuman sadece sana hatırlatma yapar.

No comments: