Complete analysis of Oracle database configuration scheme

Source: Internet
Author: User
Tags thread dedicated server oracle database

In this paper, the configuration scheme of Oracle database is described in detail in several aspects.

All users connected to Oracle must execute two code modules:

Application or Oracle Tools: A database user executes a database application or an Oracle tool that emits SQL statements to an Oracle database.

Oracle Server Program: responsible for interpreting and processing SQL statements in the application.

In a multiple-process instance, the code that connects the user can be configured in one of the following three scenarios:

1. For each user, its database application and server program are combined into a single user process;

2. For each user, its database application is run by the user process, and there is a dedicated server process. Executes the code for the Oracle server. Such a configuration is called a dedicated server architecture;

3. The process of executing a database application differs from the process of executing Oracle server code, and each server process (executing Oracle server code) can serve multiple user processes, a configuration called a multiple-threaded server architecture.

1) The structure of the user/server process:

In this configuration, database applications and Oracle server programs run in the same process, which is called a user process.

This Oracle configuration is sometimes referred to as a single task Oracle (Single_task Oracle), which is suitable for operating systems that maintain an isolation between database applications and Oracle code in the same process, which is required for data security and integrity. The program interface is responsible for the isolation and protection of Oracle Server code, transferring data between database applications and Oracle user programs.

2 Use the system structure of the dedicated server process:

The Oracle system that uses the dedicated server process runs on two computers. In this system, the user process executes the database application on one computer, and the server process on the other computer executes the corresponding Oracle server code, and the two processes are separate. The different server processes that are established for each user process are called dedicated server processes because the server process works only with the connected user processes. This configuration is also known as two-task Oracle. Each user process connected to Oracle has a corresponding dedicated service process. This system architecture allows client applications to be performed on workstations, communicating with computers running Oracle over the network. This structure is also available when client applications and Oracle server code are executed on the same machine.

3 The system structure of the multi-thread server:

A multiple-threaded server configuration allows many user processes to share few server processes. In the absence of a multiple-threaded server configuration, each user process requires its own dedicated server process. In configurations with multiple thread servers, many user processes connect to the dispatch process, and the dispatch process sends customer requests to a shared server process. The advantage of a multiple-threaded server configuration is to reduce system overhead and increase the number of users.

The following types of processes are required in this system:

1. The network receiver process connects the user process to the scheduling process and the dedicated server process.

2, one or more scheduling processes.

3, one or more shared server processes.

Where the network sink process waits for a new connection request, determines whether each user process can use the shared server process. If it can be used, the receiver process returns the address of a dispatch process to the user process. If a user process requests a dedicated server, the sink process establishes a dedicated server process that connects the user process to the dedicated server process. Configure at least one dispatch process for each network protocol used by the database client and start it.

When a user makes a call, the dispatch process places the request in the request queue of the SGA, which is obtained by the available shared server processes. The shared server process makes all necessary database calls to complete the request for each user process. When the server completes the request, the result is returned to the queue of the scheduling process, and the scheduled process returns the completed request to the user process.

Shared server process: The shared server process and the dedicated server process provide the same functionality, except that the shared server process is not a connection to the specified user process, and a shared server process can request services for any customer in the configuration of a multiple-thread server. The SGA for a shared server process does not contain user-related data, and its information is accessible to all shared server processes, and it contains only stack space, process-specific variables. All information about the session is included in the SGA. Each shared server process can access the data space of all sessions so that any service process can process requests for any session. The data space for each session is allocated space in the SGA.

Oracle can dynamically adjust the shared server process based on the length of the request queue. The shared server process that can be established places the request on the request queue. A user request is a single program interface call to the database, which is an SQL statement. In the SGA, the request queue is common to all of the instance's scheduling processes. The server process checks the public request queue for the new request, examines a request from the queue according to the FIFO principle, and makes the necessary calls to the database to complete the request. The shared server process places the response in the response queue of the dispatch process. Each scheduling process has its own response queue in the SGA, and each scheduling process is responsible for sending the completed request back to the appropriate user process.

Related Article

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.