Shared server mode
Shared server mode, also known as multi-threaded server mode. In this mode, Oracle database, the process allows multiple users to share very few server processes. Therefore, the user can achieve the number of concurrent access will greatly increase. If you use a dedicated server mode, each user connects to the database, each user process requires his own dedicated server process. In other words, the client process and server-side process is one to one.
If using shared server mode, then the multiple users can share a server process, that is, when client process and server process is many to one situation. This is mainly achieved through the scheduler. Scheduler by adding database access multiple session requests directed to a common queue. Server process to a shared pool of idle shared server process in order to get a request from the queue. In other words, a small pool of shared server process can service a large number of clients.
Advantages and disadvantages of shared servers can be summarized by two sentences. Many to one advantage is that the client process, an increase of the number of users the database can support. Drawback is that all users share a process, the performance of the user to access the database have an impact.
Specifically, in the following application scenarios, you can choose shared server mode.
1, the number of clients more prospects.
When large numbers of users need to connect to the database and the need for effective use of available system resources when you need to consider shared server mode. Specifically, as now used in some client / server model of network application software such as ERP systems and so on. On the one hand because the more the number of users; other companies due to limited funding, so the acquisition of a general server. These servers are some of the hardware limitations, such as database systems and application servers adopt a unified front server. So often require the database to make full use of hardware resources in order to reduce the conflict between the two.
In this case, often using shared server mode, more appropriate.
2, server memory limit is relatively large.
Shared server mode, when connected users increases, the memory usage increase, not a lot. Because they share a server process. So, from this perspective, the shared server mode can reduce the memory usage. However, in dedicated server mode, the memory usage is almost proportional to the number of users increases.
Therefore, the user if some of the old server to deploy Oracle database, because the board has limited memory upgrade, so, in order to get a good database performance, often using shared server mode. So, the user instant access to the database at the same time increase its memory will not have much impact. Can greatly reduce the memory pressure.
3, certain features require the use of shared server mode.
Although, shared server mode with the dedicated server mode in most cases, are common, supports most of the functionality Oracle database system. However, a number of specific functions, still need a database administrator in the shared server mode, it can be enabled. Typically, such as Oracle database server connection sharing, connection concentration and load balancing technologies. They must be able to run the shared mode.
Load balancing in a cluster environment for multi-machine shared database to ensure the application of high availability. The automatic parallel processing and load-sharing, but also to achieve fault tolerant database, and no breakpoint recovery. Therefore, in some performance and stability requirements for the higher scenarios, such as banks, often will use load balancing techniques. At this point, the database administrator when configuring the database, you need to consider the shared server mode.
Dedicated server mode
In dedicated server mode, the database server requires each user to have a dedicated server process. That is, each server has a server process. Database server to an existing server process back to the client geology, and then the client will resend the connection request to the server provided by geology, compared with the dedicated server. Dedicated server mode because the client and server-side process is one to one, so its performance may be an advantage. However, when the user more time, its on the server hardware resources, particularly memory, will produce relatively large pressure.
If you meet the following characteristics of enterprise application scenarios, then special in server mode with relatively good results can be achieved.
1, only a few clients.
If users connect to the database is relatively small, the dedicated server mode is preferred. Such as enterprise front is a financial management system, the number of its use will be relatively small. Because it often involves only one department. However, the data will be more. Because we know that for every transaction in the financial system needs a detailed record. Therefore, although only one department with the financial, but the amount of its records often record the amount of each of the other departments combined. On record volume, connected users and relatively few cases, using a dedicated server mode, it can be said is a more sensible choice.
2, the database structures for data warehouse system.
A data warehouse is a very typical database technology application. He is a subject oriented, integrated, time-varying, non-volatile data set and is to support management decision-making process. He told the same Oracle database, is a relational database, which records stored in tabular form and structure to a uniform language for data queries. The main purpose of using the data warehouse is to the timely completion of business processes, to give customers timely response.
Although, the relational database able to adapt to the needs of large database applications, but can not be simply piled directly into the data warehouse to use. Because the data warehouse is mainly used to deal with multidimensional data. His way of storing records is different with the ordinary. Mainly by way of the data warehouse to store an array of records, that there is no uniform rule to follow, there is no unified dimensional model to follow, his ex can be purchased only classified according to different categories. Although the traditional two-dimensional database can not be simply a pile to become a data warehouse. However, the time in the design of data warehouses, not to say that to completely reinvent the wheel, but can use the existing Oracle database system to process the data, comprehensive information from which to construct a data warehouse to meet the different needs.
So, if this database is to build a data warehouse, you have to use dedicated server mode. This is mandatory for Oracle databases.
3, online transaction processing systems.
Online transaction processing systems, the English referred to as OLTP. In this application, the adopted model for good? In the industry, there is no uniform standard. Some say that because the number of online transaction processing systems use more, it should be a shared connection to the server model; while others say online processing system requirements for the timely and relatively high, while the shared server model may be waiting a long time, so it should be connection using a dedicated server mode. The author is more inclined to back this view.
Online transaction processing systems, generally speaking, there are more long transactions and large affairs. Several operations, such as a user, must, as a transaction processing concepts. At this point, if the user requests is greater than the number of shared server processes, then this time, queuing occurs. Suppose now have a shared server process is executing a long transaction, then the request queue will need to wait. Straight the transaction is completed. From a client perspective, the client requests to lengthen the response time. So, when users share the process than the number of connection requests to a long time, so long shared connection transaction will result in sharing the process queue. The longer the transaction, the longer the queue time, user response time is longer. This vicious cycle go on, a lot of online transaction operations are subject to varying degrees. Therefore, if the online transaction processing system integration is in line with the two conditions (greater than the number of users sharing the connection request process and most of its business affairs or large transaction length), then use a dedicated server, shared server connection mode, connection mode than using higher efficiency . In order to protect the online transaction processing systems up and running, I suggest that the database administrator to configure dedicated server connection mode. Do not meet one of these two conditions, the use of shared connection mode more reasonable.