Refreshing ing Oracle Database for Shared Server (updating)

Source: Internet
Author: User
Tags dedicated server server memory

Refreshing ing Oracle Database for Shared Server (updating)

When the database is in the form of a shared server, client requests and database connections are divided into the following steps:


1) connect the client request to the database, listen to accept the request, and assign a dispatcher with a lower load ratio for processing.
2) After the dispatcher receives the request, it will put the client's request into the request queue of the sga.
3) The sharing server process located in the large pool or share pool starts to process client request information in the Request queue.
4) The Shared Server puts the processed request information in the corresponding queue.
6) then, the processed information is sent to the dispatcher process and the connection between the client and the database is enabled.
The dispatcher can support multiple client connections concurrently. each client connection is bound to a virtual circuit, which is a piece of shared memory used by the dispatcher for client database connection requests and replies. the dispatcher places a virtual circuit on a common queue when a request arrives.

In addition, the listener plays a major role in the Shared Server mode, that is, pmon regularly checks the dispatcher load, and then registers the address and load information to the listener, when the client is connected, a dispatcher with a relatively small load will be allocated to the listener for processing.
The share server process implements inbound and outbound through idle virtual circuit.
2) set common parameters for shared servers;
The server memory allows dynamic modification of relevant parameters in the database running state (alter system)
1) shared_servers; set the minimum process of the Shared Server. This parameter must be set to start the Shared Server. Other parameters can be effectively selected.
2) max_shared_servers; sets the maximum number of shared processes that can be started simultaneously on the shared server. If this parameter is specified, the database dynamically starts a certain number of processes and terminates a certain amount of data through the pmon process, but cannot exceed the maximum value or be lower than the minimum process set by shared_servers. If this parameter is not specified, the database dynamically creates the process based on the system memory and request load.
3) shared_server_sessions: allows the sharing server process to process the number of sessions simultaneously. This parameter must be related to the sessions parameter. If this parameter is set, the database can also start the dedicated server mode to process client requests.
4) dispatchers; sets the number of scheduling processes involved in client requests. This parameter cannot be automatically managed as the share server process does.
5) max_dispatchers; currently, this parameter is reserved for later versions and sets the maximum value of the scheduling process.
6) circuits; specify a virtual circuit with equivalent data to transmit session processing information of client links.
3) Enable the Shared Server
1) As long as the shared_servers parameter is set to a non-zero number, the Shared Server Mode starts. If this static parameter is not found in the parameter file, check that this parameter is 1, the Shared Server is enabled and a dispatcher process is started.
Eg:
SYS @ conn # alter system reset shared_servers;
The system has been changed.
SYS @ conn # show parameter shared_servers;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer 3
Shared_servers integer 1
SYS @ conn # alter system reset max_shared_servers;
The system has been changed.
SYS @ conn # show parameter max_shared_servers
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer 3
SYS @ conn # startup force
The ORACLE routine has been started.
Total System Global Area 322240512 bytes
Fixed Size 1299652 bytes
Variable Size 197135164 bytes
Database Buffers 113246208 bytes
Redo Buffers 10559488 bytes
The database has been loaded.
The database has been opened.
SYS @ conn # show parameter shared_servers;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer
Shared_servers integer 1
SYS @ conn #
Oracle @ gbh-oracle: ~> Ps-ef | grep ora_s000_ORCL
Oracle 23122 1 0? 00:00:00 ora_s000_ORCL
Oracle 23505 23358 0 00:00:00 pts/0 grep ora_s000_ORCL
Oracle @ gbh-oracle: ~>
Eg:
Oracle @ gbh-oracle: ~> Exit
Exit
SYS @ conn # alter system set shared_servers = 0;
The system has been changed.
SYS @ conn #! Ps-ef | grep ora_s000_ORCL
Oracle 23686 10911 0 00:00:00 pts/0/bin/bash-c ps-ef | grep ora_s000_ORCL
Oracle 23688 23686 0 00:00:00 pts/0 grep ora_s000_ORCL
SYS @ conn #
Note: 1. For version compatibility, if the shared-servers parameter is not set in the parameter file, but the dispatcher information is set in the parameter file, the shared Server process is automatically enabled, the default value is 1. You can manually execute the alter system command to set it to 0 and disable it.
2. If the shared_servers and dispatcher parameters are not set in the parameter file, you cannot start the Shared Server by setting dispatcher through alter system, you must also set shared_servers to a value not 0. The test above verifies this information.
2) For the max_shared_servers parameter, specify the maximum number of shared server processes created by pmon. If this parameter is not specified, the number of shared server processes is set based on two limits, 2nd are system resources. By default, the shared server j process does not exceed this number. However, you can manually set the pmon process to force the creation of this process.
Eg:
SYS @ conn # show parameter shared_servers
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer
Shared_servers integer 0
SYS @ conn # show parameter max_shared_servers
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer
SYS @ conn # alter system set shared_servers = 2;
The system has been changed.
SYS @ conn # alter system set max_shared_servers = 4;
The system has been changed.
SYS @ conn # show parameter shared_servers
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer 4
Shared_servers integer 2
SYS @ conn #! Ps-ef | grep ora_s
Oracle 25295 1 0? 00:00:00 ora_smon_ORCL
Oracle 25309 1 0? 00:00:00 ora_smco_ORCL
Oracle 27409 1 0? 00:00:00 ora_s000_ORCL
Oracle 27411 1 0? 00:00:00 ora_s00w.orcl
Oracle 27450 27330 0 00:00:00 pts/0/bin/bash-c ps-ef | grep ora_s
Oracle 27452 27450 0 00:00:00 pts/0/bin/bash-c ps-ef | grep ora_s
SYS @ conn # alter system set shared_servers = 10;
The system has been changed.
SYS @ conn # show parameter shared_servers;
NAME TYPE VALUE
-----------------------------------------------------------------------------
Max_shared_servers integer 4
Shared_servers integer 10
SYS @ conn #! Ps-ef | grep ora_s
Oracle 25295 1 0? 00:00:00 ora_smon_ORCL
Oracle 25309 1 0? 00:00:00 ora_smco_ORCL
Oracle 27409 1 0? 00:00:00 ora_s000_ORCL
Oracle 27411 1 0? 00:00:00 ora_s00w.orcl
Oracle 27489 1 0? 00:00:00 ora_s002_ORCL
Oracle 27491 1 0? 00:00:00 ora_s003_ORCL
Oracle 27493 1 0? 00:00:00 ora_s004_ORCL
Oracle 27495 1 0? 00:00:00 ora_s005_ORCL
Oracle 27497 1 0? 00:00:00 ora_s006_ORCL
Oracle 27499 1 0? 00:00:00 ora_s007_ORCL
Oracle 27501 1 0? 00:00:00 ora_s008_ORCL
Oracle 27503 1 0? 00:00:00 ora_s009_ORCL
Oracle 27506 27330 0 00:00:00 pts/0/bin/bash-c ps-ef | grep ora_s
SYS @ conn #
L In addition, session = (1.1 * processes) + 5. Here, shared_server_sessions is set similarly to max_shared_servers, which is subject to process restrictions.
3) scheduling process settings.
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)

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.
DISPATCHERS Specify the initial number of dispatchers to start.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.