Sunday 29 July 2012

Configure Shared Servers

Notes from :-
Oracle® Database Administrator's Guide
11g Release 1 (11.1)


Configuring Oracle Database for Shared ServerShared memory resources are preconfigured to allow the enabling of shared server at run time. You need not configure it by specifying parameters in your initialization parameter file, but you can do so if that better suits your environment. You can start dispatchers and shared server processes (shared servers) dynamically using the ALTER SYSTEM statement.

This section discusses how to enable shared server and how to set or alter shared server initialization parameters. It contains the following topics:

•Initialization Parameters for Shared Server
•Enabling Shared Server
•Configuring Dispatchers
•Shared Server Data Dictionary Views

The following initialization parameters control shared server operation:

•SHARED_SERVERS: Specifies the initial number of shared servers to start and the minimum number of shared servers to keep. This is the only required parameter for using shared servers.

•MAX_SHARED_SERVERS: Specifies the maximum number of shared servers that can run simultaneously.

•SHARED_SERVER_SESSIONS: Specifies the total number of shared server user sessions that can run simultaneously. Setting this parameter enables you to reserve user sessions for dedicated servers.

•DISPATCHERS: Configures dispatcher processes in the shared server architecture.

•MAX_DISPATCHERS: Specifies the maximum number of dispatcher processes that can run simultaneously. This parameter can be ignored for now. It will only be useful in a future release when the number of dispatchers is auto-tuned according to the number of concurrent connections.

•CIRCUITS: Specifies the total number of virtual circuits that are available for inbound and outbound network sessions.


Shared server can be started dynamically by setting the SHARED_SERVERS parameter to a nonzero value with the ALTER SYSTEM statement, or SHARED_SERVERS can be included at database startup in the initialization parameter file. If SHARED_SERVERS is not included in the initialization parameter file, or is included but is set to 0, then shared server is not enabled at database startup.

Note:

For backward compatibility, if SHARED_SERVERS is not included in the initialization parameter file at database startup, but DISPATCHERS is included and it specifies at least one dispatcher, shared server is enabled. In this case, the default for SHARED_SERVERS is 1. 
However, if neither SHARED_SERVERS nor DISPATCHERS is included in the initialization file, you cannot start shared server after the instance is brought up by just altering the DISPATCHERS parameter. You must specifically alter SHARED_SERVERS to a nonzero value to start shared server.

Determining a Value for SHARED_SERVERS
The SHARED_SERVERS initialization parameter specifies the minimum number of shared servers that you want created when the instance is started. After instance startup, Oracle Database can dynamically adjust the number of shared servers based on how busy existing shared servers are and the length of the request queue.

In typical systems, the number of shared servers stabilizes at a ratio of one shared server for every ten connections. For OLTP applications, when the rate of requests is low, or when the ratio of server usage to request is low, the connections-to-servers ratio could be higher. In contrast, in applications where the rate of requests is high or the server usage-to-request ratio is high, the connections-to-server ratio could be lower.

The PMON (process monitor) background process cannot terminate shared servers below the value specified by SHARED_SERVERS. Therefore, you can use this parameter to stabilize the load and minimize strain on the system by preventing PMON from terminating and then restarting shared servers because of coincidental fluctuations in load.

If you know the average load on your system, you can set SHARED_SERVERS to an optimal value. The following example shows how you can use this parameter:

Assume a database is being used by a telemarketing center staffed by 1000 agents. On average, each agent spends 90% of the time talking to customers and only 10% of the time looking up and updating records. To keep the shared servers from being terminated as agents talk to customers and then spawned again as agents access the database, a DBA specifies that the optimal number of shared servers is 100.

However, not all work shifts are staffed at the same level. On the night shift, only 200 agents are needed. Since SHARED_SERVERS is a dynamic parameter, a DBA reduces the number of shared servers to 20 at night, thus allowing resources to be freed up for other tasks such as batch jobs.

Decreasing the Number of Shared Server Processes
You can decrease the minimum number of shared servers that must be kept active by dynamically setting the SHARED_SERVERS parameter to a lower value. Thereafter, until the number of shared servers is decreased to the value of the SHARED_SERVERS parameter, any shared servers that become inactive are marked by PMON for termination.

The following statement reduces the number of shared servers:

ALTER SYSTEM SET SHARED_SERVERS = 5;
Setting SHARED_SERVERS to 0 disables shared server. For more information, please refer to "Disabling Shared Servers".

Limiting the Number of Shared Server Processes
The MAX_SHARED_SERVERS parameter specifies the maximum number of shared servers that can be automatically created by PMON. It has no default value. If no value is specified, then PMON starts as many shared servers as is required by the load, subject to these limitations:

•The process limit (set by the PROCESSES initialization parameter)

•A minimum number of free process slots (at least one-eighth of the total process slots, or two slots if PROCESSES is set to less than 24)

•System resources

Note:

On Windows NT, take care when setting MAX_SHARED_SERVERS to a high value, because each server is a thread in a common process.
The value of SHARED_SERVERS overrides the value of MAX_SHARED_SERVERS. Therefore, you can force PMON to start more shared servers than the MAX_SHARED_SERVERS value by setting SHARED_SERVERS to a value higher than MAX_SHARED_SERVERS. You can subsequently place a new upper limit on the number of shared servers by dynamically altering the MAX_SHARED_SERVERS to a value higher than SHARED_SERVERS.

The primary reason to limit the number of shared servers is to reserve resources, such as memory and CPU time, for other processes. For example, consider the case of the telemarketing center discussed previously:

The DBA wants to reserve two thirds of the resources for batch jobs at night. He sets MAX_SHARED_SERVERS to less than one third of the maximum number of processes (PROCESSES). By doing so, the DBA ensures that even if all agents happen to access the database at the same time, batch jobs can connect to dedicated servers without having to wait for the shared servers to be brought down after processing agents' requests.

Another reason to limit the number of shared servers is to prevent the concurrent run of too many server processes from slowing down the system due to heavy swapping, although PROCESSES can serve as the upper bound for this rather than MAX_SHARED_SERVERS.

Still other reasons to limit the number of shared servers are testing, debugging, performance analysis, and tuning. For example, to see how many shared servers are needed to efficiently support a certain user community, you can vary MAX_SHARED_SERVERS from a very small number upward until no delay in response time is noticed by the users.

Limiting the Number of Shared Server Sessions
The SHARED_SERVER_SESSIONS initialization parameter specifies the maximum number of concurrent shared server user sessions. Setting this parameter, which is a dynamic parameter, lets you reserve database sessions for dedicated servers. This in turn ensures that administrative tasks that require dedicated servers, such as backing up or recovering the database, are not preempted by shared server sessions.

This parameter has no default value. If it is not specified, the system can create shared server sessions as needed, limited by the SESSIONS initialization parameter.

Protecting Shared Memory
The CIRCUITS parameter sets a maximum limit on the number of virtual circuits that can be created in shared memory. This parameter has no default. If it is not specified, then the system can create circuits as needed, limited by the DISPATCHERS initialization parameter and system resources.

Configuring DispatchersThe DISPATCHERS initialization parameter configures dispatcher processes in the shared server architecture. At least one dispatcher process is required for shared server to work.If you do not specify a dispatcher, but you enable shared server by setting SHARED_SERVER to a nonzero value, then by default Oracle Database creates one dispatcher for the TCP protocol. The equivalent DISPATCHERS explicit setting of the initialization parameter for this configuration is:

dispatchers="(PROTOCOL=tcp)"
You can configure more dispatchers, using the DISPATCHERS initialization parameter, if either of the following conditions apply:

•You need to configure a protocol other than TCP/IP. You configure a protocol address with one of the following attributes of the DISPATCHERS parameter:

◦ADDRESS

◦DESCRIPTION

◦PROTOCOL

•You want to configure one or more of the optional dispatcher attributes:

◦DISPATCHERS

◦CONNECTIONS

◦SESSIONS

◦TICKS

◦LISTENER

◦MULTIPLEX

◦POOL

◦SERVICE

Note:

Database Configuration Assistant helps you configure this parameter.
DISPATCHERS Initialization Parameter Attributes
This section provides brief descriptions of the attributes that can be specified with the DISPATCHERS initialization parameter.

A protocol address is required and is specified using one or more of the following attributes:

Attribute Description 
ADDRESS Specify the network protocol address of the endpoint on which the dispatchers listen. 
DESCRIPTION Specify the network description of the endpoint on which the dispatchers listen, including the network protocol address. The syntax is as follows: 
(DESCRIPTION=(ADDRESS=...))

PROTOCOL Specify the network protocol for which the dispatcher generates a listening endpoint. For example: 
(PROTOCOL=tcp) 
See the Oracle Database Net Services Reference for further information about protocol address syntax.



The following attribute specifies how many dispatchers this configuration should have. It is optional and defaults to 1.

Attribute Description 
DISPATCHERS Specify the initial number of dispatchers to start. 


The following attributes tell the instance about the network attributes of each dispatcher of this configuration. They are all optional.

Attribute Description 
CONNECTIONS Specify the maximum number of network connections to allow for each dispatcher. 
SESSIONS Specify the maximum number of network sessions to allow for each dispatcher. 
TICKS Specify the duration of a TICK in seconds. A TICK is a unit of time in terms of which the connection pool timeout can be specified. Used for connection pooling. 
LISTENER Specify an alias name for the listeners with which the PMON process registers dispatcher information. Set the alias to a name that is resolved through a naming method. 
MULTIPLEX Used to enable the Oracle Connection Manager session multiplexing feature. 
POOL Used to enable connection pooling. 
SERVICE Specify the service names the dispatchers register with the listeners. 


You can specify either an entire attribute name a substring consisting of at least the first three characters. For example, you can specify SESSIONS=3, SES=3, SESS=3, or SESSI=3, and so forth.

See Also:

Oracle Database Reference for more detailed descriptions of the attributes of the DISPATCHERS initialization parameter
Determining the Number of Dispatchers
Once you know the number of possible connections for each process for the operating system, calculate the initial number of dispatchers to create during instance startup, for each network protocol, using the following formula:

Number of dispatchers =
CEIL ( max. concurrent sessions / connections for each dispatcher )
CEIL returns the result roundest up to the next whole integer.

For example, assume a system that can support 970 connections for each process, and that has:

•A maximum of 4000 sessions concurrently connected through TCP/IP and
•A maximum of 2,500 sessions concurrently connected through TCP/IP with SSL

The DISPATCHERS attribute for TCP/IP should be set to a minimum of five dispatchers (4000 / 970), and for TCP/IP with SSL three dispatchers (2500 / 970:

DISPATCHERS='(PROT=tcp)(DISP=5)', '(PROT-tcps)(DISP=3)'
Depending on performance, you may need to adjust the number of dispatchers.

Setting the Initial Number of DispatchersYou can specify multiple dispatcher configurations by setting DISPATCHERS to a comma separated list of strings, or by specifying multiple DISPATCHERS parameters in the initialization file. If you specify DISPATCHERS multiple times, the lines must be adjacent to each other in the initialization parameter file. Internally, Oracle Database assigns an INDEX value (beginning with zero) to each DISPATCHERS parameter. You can later refer to that DISPATCHERS parameter in an ALTER SYSTEM statement by its index number.

Some examples of setting the DISPATCHERS initialization parameter follow.

Example: Typical 
This is a typical example of setting the DISPATCHERS initialization parameter.

DISPATCHERS="(PROTOCOL=TCP)(DISPATCHERS=2)"
Example: Forcing the IP Address Used for Dispatchers 
The following hypothetical example will create two dispatchers that will listen on the specified IP address. The address must be a valid IP address for the host that the instance is on. (The host may be configured with multiple IP addresses.)

DISPATCHERS="(ADDRESS=(PROTOCOL=TCP)(HOST=144.25.16.201))(DISPATCHERS=2)"
Example: Forcing the Port Used by Dispatchers 
To force the dispatchers to use a specific port as the listening endpoint, add the PORT attribute as follows:

DISPATCHERS="(ADDRESS=(PROTOCOL=TCP)(PORT=5000))"
DISPATCHERS="(ADDRESS=(PROTOCOL=TCP)(PORT=5001))"
Altering the Number of Dispatchers
You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of dispatchers does not change automatically. You change the number of dispatchers explicitly with the ALTER SYSTEM statement. In this release of Oracle Database, you can increase the number of dispatchers to more than the limit specified by the MAX_DISPATCHERS parameter. It is planned that MAX_DISPATCHERS will be taken into consideration in a future release.

Monitor the following views to determine the load on the dispatcher processes:

•V$QUEUE

•V$DISPATCHER

•V$DISPATCHER_RATE

See Also:

Oracle Database Performance Tuning Guide for information about monitoring these views to determine dispatcher load and performance
If these views indicate that the load on the dispatcher processes is consistently high, then performance may be improved by starting additional dispatcher processes to route user requests. In contrast, if the load on dispatchers is consistently low, reducing the number of dispatchers may improve performance.

To dynamically alter the number of dispatchers when the instance is running, use the ALTER SYSTEM statement to modify the DISPATCHERS attribute setting for an existing dispatcher configuration. You can also add new dispatcher configurations to start dispatchers with different network attributes.

When you reduce the number of dispatchers for a particular dispatcher configuration, the dispatchers are not immediately removed. Rather, as users disconnect, Oracle Database terminates dispatchers down to the limit you specify in DISPATCHERS,

For example, suppose the instance was started with this DISPATCHERS setting in the initialization parameter file:

DISPATCHERS='(PROT=tcp)(DISP=2)', '(PROT=tcps)(DISP=2)'
To increase the number of dispatchers for the TCP/IP protocol from 2 to 3, and decrease the number of dispatchers for the TCP/IP with SSL protocol from 2 to 1, you can issue the following statement:

ALTER SYSTEM SET DISPATCHERS = '(INDEX=0)(DISP=3)', '(INDEX=1)(DISP=1)';
or

ALTER SYSTEM SET DISPATCHERS = '(PROT=tcp)(DISP=3)', '(PROT-tcps)(DISP=1)';
Note:

You need not specify (DISP=1). It is optional because 1 is the default value for the DISPATCHERS parameter.
If fewer than three dispatcher processes currently exist for TCP/IP, the database creates new ones. If more than one dispatcher process currently exists for TCP/IP with SSL, then the database terminates the extra ones as the connected users disconnect.

Suppose that instead of changing the number of dispatcher processes for the TCP/IP protocol, you want to add another TCP/IP dispatcher that supports connection pooling. You can do so by entering the following statement:

ALTER SYSTEM SET DISPATCHERS = '(INDEX=2)(PROT=tcp)(POOL=on)';
The INDEX attribute is needed to add the new dispatcher configuration. If you omit (INDEX=2) in the preceding statement, then the TCP/IP dispatcher configuration at INDEX 0 will be changed to support connection pooling, and the number of dispatchers for that configuration will be reduced to 1, which is the default when the number of dispatchers (attribute DISPATCHERS) is not specified.

Notes on Altering Dispatchers
•The INDEX keyword can be used to identify which dispatcher configuration to modify. If you do not specify INDEX, then the first dispatcher configuration matching the DESCRIPTION, ADDRESS, or PROTOCOL specified will be modified. If no match is found among the existing dispatcher configurations, then a new dispatcher will be added.

•The INDEX value can range from 0 to n-1, where n is the current number of dispatcher configurations. If your ALTER SYSTEM statement specifies an INDEX value equal to n, where n is the current number of dispatcher configurations, a new dispatcher configuration will be added.

•To see the values of the current dispatcher configurations--that is, the number of dispatchers, whether connection pooling is on, and so forth--query the V$DISPATCHER_CONFIG dynamic performance view. To see which dispatcher configuration a dispatcher is associated with, query the CONF_INDX column of the V$DISPATCHER view.

•When you change the DESCRIPTION, ADDRESS, PROTOCOL, CONNECTIONS, TICKS, MULTIPLEX, and POOL attributes of a dispatcher configuration, the change does not take effect for existing dispatchers but only for new dispatchers. Therefore, in order for the change to be effective for all dispatchers associated with a configuration, you must forcibly kill existing dispatchers after altering the DISPATCHERS parameter, and let the database start new ones in their place with the newly specified properties.

The attributes LISTENER and SERVICES are not subject to the same constraint. They apply to existing dispatchers associated with the modified configuration. Attribute SESSIONS applies to existing dispatchers only if its value is reduced. However, if its value is increased, it is applied only to newly started dispatchers.

Shutting Down Specific Dispatcher Processes
With the ALTER SYSTEM statement, you leave it up to the database to determine which dispatchers to shut down to reduce the number of dispatchers. Alternatively, it is possible to shut down specific dispatcher processes. To identify the name of the specific dispatcher process to shut down, use the V$DISPATCHER dynamic performance view.

SELECT NAME, NETWORK FROM V$DISPATCHER;
Each dispatcher is uniquely identified by a name of the form Dnnn.

To shut down dispatcher D002, issue the following statement:

ALTER SYSTEM SHUTDOWN IMMEDIATE 'D002';
The IMMEDIATE keyword stops the dispatcher from accepting new connections and the database immediately terminates all existing connections through that dispatcher. After all sessions are cleaned up, the dispatcher process shuts down. If IMMEDIATE were not specified, the dispatcher would wait until all of its users disconnected and all of its connections terminated before shutting down.

Disabling Shared Servers
You disable shared server by setting SHARED_SERVERS to 0. No new client can connect in shared mode. However, when you set SHARED_SERVERS to 0, Oracle Database retains some shared servers until all shared server connections are closed. The number of shared servers retained is either the number specified by the preceding setting of SHARED_SERVERS or the value of the MAX_SHARED_SERVERS parameter, whichever is smaller. If both SHARED_SERVERS and MAX_SHARED_SERVERS are set to 0, then all shared servers will terminate and requests from remaining shared server clients will be queued until the value of SHARED_SERVERS or MAX_SHARED_SERVERS is raised again.

To terminate dispatchers once all shared server clients disconnect, enter this statement:

ALTER SYSTEM SET DISPATCHERS = '';
Shared Server Data Dictionary ViewsThe following views are useful for obtaining information about your shared server configuration and for monitoring performance.

View Description 
V$DISPATCHER Provides information on the dispatcher processes, including name, network address, status, various usage statistics, and index number. 
V$DISPATCHER_CONFIG Provides configuration information about the dispatchers. 
V$DISPATCHER_RATE Provides rate statistics for the dispatcher processes. 
V$QUEUE Contains information on the shared server message queues. 
V$SHARED_SERVER Contains information on the shared servers. 
V$CIRCUIT Contains information about virtual circuits, which are user connections to the database through dispatchers and servers. 
V$SHARED_SERVER_MONITOR Contains information for tuning shared server. 
V$SGA Contains size information about various system global area (SGA) groups. May be useful when tuning shared server. 
V$SGASTAT Contains detailed statistical information about the SGA, useful for tuning. 
V$SHARED_POOL_RESERVED Lists statistics to help tune the reserved pool and space within the shared pool. 



-----------------

Configuring Shared Server in Oracle 10g 


1. The DISPATCHERS parameter
When you are configuring Oracle Shared Server you must set the initialization parameters for your instance. 

On most systems, you only need to configure the DISPATCHERS parameter. The other parameters are optional and have appropriate default settings.

Normally, the DISPATCHERS parameter is already configured to start one dispatcher for each network protocol and to service the XML database. However, this depends on the options selected when you created your database. 

You can apply multiple sets of values in the DISPATCHERS parameter using the format

'< parameters for first set>','< parameters for second set>'

Various attributes, or arguments, can be added to each DISPATCHERS parameter using a name-value syntax similar to that used by Oracle Net Services. 

The syntax allows you to specify existing and additional non-case-sensitive attributes in a position-independent manner. 

For example, the following DISPATCHERS parameter contains two attributes that tell the dispatcher which protocol it is for and how many dispatchers it has to start: 

DISPATCHERS = '(PROTOCOL=TCP) (DISPATCHERS=3)'

The DISPATCHERS parameter is a String parameter type. Its parameter class is Dynamic and its default value is NULL. 

NULL means that, unless it is configured with at least one dispatcher, no dispatchers will be started. 

DISPATCHERS = '(PROTOCOL=TCP) (DISPATCHERS=3)' 

When estimating how many dispatchers to use, you must be aware that the number of connections a dispatcher can deal with depends on the type of workload. 

However, a good rule of thumb is to provide one dispatcher for every fifty concurrent database connections. 

Of all the dispatcher attributes, only PROTOCOL is required. Also, it's only necessary to enter the three-letter abbreviation of the argument when entering the attribute. 

Some of the attributes that can be added to a DISPATCHERS parameter are: 

•PROTOCOL ( PRO or PROT) 
•DISPATCHERS ( DIS or DISP) 
•SERVICE ( SER or SERV) 
•LISTENER ( LIS or LIST) 
•SESSION ( SES or SESS) 
•CONNECTIONS ( CON or CONN) 
PROTOCOL ( PRO or PROT) 
PROTOCOL indicates the network protocol that the dispatcher is opening a listening endpoint for. The protocol usually used is TCP. 
DISPATCHERS ( DIS or DISP) 
DISPATCHERS provides the number of dispatchers to start. The default value is 1. 
SERVICE ( SER or SERV) 
SERVICE refers to the Oracle Net Services name that is registered with the listener by the dispatcher. If a service name is not provided, the dispatcher registers the values in SERVICE_NAMES. 
LISTENER ( LIS or LIST) 
LISTENER is the listener's alias name. This is used by the PMON process to register dispatcher information. The alias should be resolved through a naming method. 
SESSION ( SES or SESS) 
SESSION represents a value for the maximum number of network sessions that each dispatcher can handle. The default value depends on the operating system used. 

CONNECTIONS ( CON or CONN) 
CONNECTIONS represents a value for the maximum number of network connections that each dispatcher can handle. The default value depends on the operating system used. For example, Windows and Sun Solaris have a default value of 1024. 
Question 

Which dispatcher attribute must be entered in the DISPATCHER S parameter? 

Options:

1.DISPATCHERS 
2.LISTENER 
3.PROTOCOL 
4.SERVICE 
Answer 
PROTOCOL is the only dispatcher attribute that is required in the DISPATCHER S parameter. 

Option 1 is incorrect. The value set in the DISPATCHERS attribute indicates the number of dispatchers to start for the network protocol.

Option 2 is incorrect. LISTENER is not required. This value provides the listener's alias name, which is used by the PMON process to register dispatcher information.

Option 3 is correct. PROTOCOL is the only required attribute and it indicates the name of the network protocol for which the dispatcher is opening a listening endpoint. Usually, the protocol used is TCP. 

Option 4 is incorrect. Although it is not required, SERVICE refers to the Oracle Net Services name that is registered with the listener by the dispatcher. 

To change the initialization parameters in Enterprise Manager you select All Initialization Parameters in the Instance section of the Administration tabbed page. 

To find the dispatchers in the list of Initialization Parameters you enter d ispatchers in the Filter field and click Go. 

The DISPATCHERS parameter in this server uses the protocol TCP and the Oracle Net Services name orcl1XDB. 

You now want to set the number of dispatchers to 4 in the parameter. 

You Type (DIS=4) in the Value field for the dispatchers parameter and click Apply. 

The DISPATCHERS parameter is now updated to have a maximum of four dispatchers. 

You can also specify other attributes in the parameter, such as Sessions, Listener, or Connections. 

Suppose you now want to specify 200 as the maximum number of network connections to allow for each dispatcher. 

You type (CONN=200) into the Value field for the DISPATCHERS parameter and click Apply. 

The DISPATCHERS parameter now specifies that the maximum number of network connections is 200 for each dispatcher. 

Question 
You now have to update the DISPATCHERS parameter so that there will be five dispatchers for the instance.

This task requires you to enter the argument that sets 5 dispatchers to start for the TCP protocol. Which of these options allows you to complete this task?

Options:

1.You type (DIS=5) into the Value field in the Initialization Parameter page and click Apply. 
2.You type (SESS=5) into the Value field in the Initialization Parameter page and click Apply. 
Answer 
You type (DIS=5) into the Value field in the Initialization Parameter page and click Apply. 


2. SHARED_SERVERS and MAX_SHARED_SERVERS
Although the DISPATCHERS parameter is the only parameter that needs to be configured in a shared server, other parameters can be changed when configuring the instance. 

For example, you may want to set the maximum and minimum number of server processes that can run concurrently. 

To do this you set the MAX_SHARED_SERVERS and SHARED_SERVERS parameters.

To specify the minimum number of server processes that can run concurrently, you configure the SHARED_SERVER parameter. 

It is not essential to set this parameter because the Common Request Queue is monitored by the instance. 

The instance can add shared servers as the queue needs them, and take them off again when they are no longer required. 

To find the SHARED_SERVERS parameter in the Initialization Parameters page, you enter shared_servers into the Filter field and click Go. 

The SHARED_SERVERS parameter type is Integer and its class is Dynamic. Its default value is 0 if DISPATCHERS is NULL , and 1 if DISPATCHERS is set. 

The range of values that can be used for the SHARED_SERVERS parameter varies according to the operating system. 

Common practice suggests that you set one shared server for every 25 concurrent database connections. 

You now want to set the SHARED_SERVERS parameter with enough shared servers for 75 concurrent database connections. 

You type 3 in the Value field for the SHARED_SERVERS parameter and click Apply. 

The SHARED_SERVERS parameter is now set to 3. 

You configure the MAX_SHARED_SERVERS parameter to specify the maximum number of server processes that can run simultaneously. 

It is important to set this parameter to control the instance, as it creates additional shared servers to service the needs of the common request queue. 

The MAX_SHARED_SERVERS is an Integer parameter type, and its class is Dynamic. It has no default value, and its range of values depends on the operating system. 

You now want to set the maximum number of shared servers that can be run simultaneously to eight. 

You type 8 into the Value field for the MAX_SHARED_SERVERS parameter and click Apply. 

The MAX_SHARED_SERVERS parameter is now set to 8. 

It's best to set the MAX_SHARED_SERVERS parameter when activity is at its highest. You should check the limit against the activity of the shared servers to find the right setting. 

You can find the maximum number of servers started by querying the V$SHARED_SERVER_MONITOR data dictionary view. 

Question 
Although the instance can add shared servers as required by the Common Request Queue, you decide to set it in advance to be sure that there is an adequate number of shared servers to meet the number of concurrent database connections. 

This task requires you to input the value to ensure that a minimum of twelve shared server processes will run simultaneously. Which of these options allows you to complete this task?

Options:

1.You type 12 into the Value field for the max_shared_servers parameter in the Initialization Parameter page and click Apply. 
2.You type 12 into the Value field for the shared_servers parameter in the Initialization Parameter page and click Apply. 
Answer 
You type 12 into the Value field for the SHARED_SERVERS parameter in the Initialization Parameter page and click Apply. 


3. CIRCUITS and SHARED SERVER SESSIONS
The CIRCUITS parameter enables you to control user connections to the database through dispatchers and servers. These connections are known as virtual circuits. 

The CIRCUITS parameter determines the total number of virtual circuits that are available for inbound and outbound network sessions. 

To find the virtual circuits parameter in the Initialization Parameter page, you enter circuits into the Filter field and click Go. 

The CIRCUITS parameter type is Integer, and its class is Dynamic. 

Its default value is the same as that of SESSIONS if the Oracle Shared Server is configured. 

If not, the default value is 0. 

Now you want to change the total number of virtual circuits that are available for inbound and outbound network sessions. 

You type 100 in the Value field and click Apply. 

The CIRCUITS parameter is now set to 100. 

This parameter is one of several that provide the total SGA requirements for an instance. 

However, you set it only if you want to limit the total number of connections users may make while using the shared server architecture. 

To control the total number of shared server sessions that can run concurrently, you set the SHARED_SERVER_SESSIONS parameter. 

This parameter can also be used to reserve user sessions for dedicated servers.

To find it in the Intialization Parameters page, you enter shared_server_sessions in the Filter field and click Go. 

You now want to change the total number of shared server sessions that can run concurrently to 100. 

You type 100 in the Value field and click Apply.

The total number of shared server sessions that can open concurrently is now set at 100. 

Question 
You need to change one of the initialization parameters for the instance so as to control the user connections to the database through dispatchers and servers. 

This task requires you to set the appropriate parameter so that a total of 80 connections only can be made. Which of these options allows you to complete this task?

Options:

1.You click All Initialization Parameters in the Instance section of the Administration tabbed page. You type circuits in the Filter field and click Go. You then type 80 into the Value field for the CIRCUITS parameter and click Apply. 
2.You click All Initialization Parameters in the Security section of the Administration tabbed page. You type virtual_circuits in the Filter field and click Go. You then type 80 into the CIRCUITS field and click Apply. 
Answer 
You click All Initialization Parameters in the Instance section of the Administration tabbed page. You type circuits in the Filter field and click Go. You then type 80 into the Value field for the CIRCUITS parameter and click Apply. 


Question 

Match the initialization parameters used to configure Shared Server to their corresponding definitions. 

Options:

1.CIRCUITS 
2.MAX_SHARED_SERVERS 
3.SHARED_SERVERS 
4.SHARED_SERVER_SESSIONS 
Targets:

1.The maximum number of server processes that can run simultaneously 
2.The minimum number of server processes that can run concurrently 
3.The total number of virtual circuits for inbound and outbound network sessions 
4.The total number of shared server sessions that can run concurrently 
Answer 
MAX_SHARED_SERVERS sets the maximum number of server processes, and SHARED_SERVERS sets the minimum number of server processes. CIRCUITS sets the total number of virtual circuits for sessions, and SHARED_SERVER_SESSIONS sets the total number of shared server sessions that can run concurrently.

The CIRCUITS parameter controls the number of virtual circuits, which are the user connections made to the database through dispatchers and servers. 

The MAX_SHARED_SERVERSparameter is needed to control the instance, which creates additional shared servers to service the needs of the Common Request Queue. 

It is not essential to set SHARED_SERVERS , because the instance monitors the Common Request Queue and adds shared servers accordingly. 

The SHARED_SERVER_SESSIONS parameter can also be used to reserve user sessions for dedicated servers.

Summary
In order to configure Oracle Shared Server you must update the initialization parameters for the instance. 

However, only the DISPATCHERS parameter is required in most systems. This parameter is used to start one or more dispatchers for the network protocol. You can also set various attributes for each dispatcher using the name-value syntax. Only the protocol attribute, usually TCP, is required. 

To control the minimum and maximum number of server processes that can run concurrently, you use the SHARED_SERVERS and MAX_SHARED_SERVERS parameters respectively. The SHARED_SERVERS parameter is less important, as the instance monitors the Common Request Queue so it knows when to add shared servers. However, the MAX_SHARED_SERVERS parameter is needed to limit how many shared servers are added. 

You can also set the CIRCUITS parameter to control how many virtual circuits are available for inbound and outbound network sessions. To control the total number of shared server sessions that can run concurrently, you set the SHARED_SERVER_SESSIONS parameter.

No comments:

Post a Comment