Initialization Parameters for Shared ServerThe following initialization parameters control shared server operation: You need to set two parameter
- dispatchers
- shared_servers
This command will create three dispatchers and each dispatcher can established 10 sessions. alter system set dispatchers= "(protocol=tcp)(dispatchers=3)(connections=10)"
This command will create three pre initialized server process for shared server connections. alter system set shared_servers= 3
By this parameter you can established max 20 sessions for shared servers connections. alter system set shared_server_sessions= 20
other parameters are: 1. max_dispatchers
MAX_DISPATCHERS specifies the maximum number of dispatcher processes allowed to be running simultaneously. It can be overridden by the DISPATCHERS parameter and is maintained for backward compatibility with older releases.
2. max_shared_servers
MAX_SHARED_SERVERS specifies the maximum number of shared server processes allowed to be running simultaneously. Setting this parameter enables you to reserve process slots for other processes, such as dedicated servers.
When you want to reduce the range of shared servers, you can reduce MAX_SHARED_SERVERS before reducing SHARED_SERVERS. If MAX_SHARED_SERVERS is lower than SHARED_SERVERS, then the number of shared servers will not vary but will remain at the constant level specified by SHARED_SERVERS. If MAX_SHARED_SERVERS is not specified, then a shared server process may be spawned as long as the number of free process slots is greater than 1 / 8 the maximum number of processes, or 2 if PROCESSES is less than 24.
How to established client shared server connections to the database
make entry in tnsnames.ora at client side.
test = (description= (address_list= (address =(protocol=tcp)(host=urhostname)(port=1521)) ) (connect_data= (service_name=orcl) (server=shared) ) )
Check Listener have dispatcher service register.
lsnrctl services
Example output
Instance "orcl", status READY, has 3 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER "D000" established:0 refused:0 current:0 max:10 state:ready DISPATCHER <machine: sales-server, pid: 1689> (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52414)) "D001" established:0 refused:0 current:0 max:10 state:ready DISPATCHER <machine: sales-server, pid: 1691> (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=52415)) Listener Control Utility SERVICES Command
The name of the service handler. Dispatchers are named D000 through D999. Dedicated servers have the name of DEDICATED. This section also identifies the following about the service handler:
-
established: The number of client connections this service handler has established.
-
refused: The number of client connections it has refused.
-
current: The number of client connections it is handling, that is, its current load.
-
max: The maximum number of connections for the service handler, that is, its maximum load.
-
state: The state of the handler: - A READY state means that the service handler can accept new connections. - A BLOCKED state means that the service handler cannot accept new connections.
|
No comments:
Post a Comment