Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the database connection methods?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what the database connection methods are, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

When you set up an Oracle database, you should see an option on the database setup assistant wizard about how the database's connection mode should be used.

When you set up an Oracle database, you should see an option on the database setup assistant wizard about how the database's connection mode should be used. In Oracle9i or 10g, you can see that there are two connection modes, one is called dedicated server connection (dedicated server) and the other is called shared server connection (shared server).

Let's classify and talk about the differences between the two connections.

Dedicated server mode means that every time the Oracle is accessed, the Listener of the Oracle server gets the access request and then creates a new process to service the access. Therefore, for each client access, a new process is generated to serve, which is similar to an one-to-one mapping relationship. A very important feature of this connection mode is that UGA (user global domain) is stored in PGA (process global domain). This feature also shows that the current user's memory space is allocated according to the process.

The other shared server connection is a concept of connection pooling (pool) that is commonly used when programming.

In this mode, a group of server connection processes are created when the database is initialized, and then these connection processes are put into a connection pool to manage. The number of processes in the initialized pool can be set manually when the database initialization is established. When a connection is established, Listener first receives a request from the client to establish a connection, and then Listener generates a process called dipatcher to connect with the client. The scheduler puts the client's request in a request queue in the SGA (system global domain), then looks for free connections in the shared server connection pool, and then lets the idle server process it. After processing, the processing results are put in the corresponding queue of SGA. The scheduler queries the corresponding queue, gets the returned result, and then returns it to the client. The advantage of this connection mode is that the number of server processes can be controlled, and it is unlikely that the server memory will crash due to too many connections.

However, due to increased complexity and requests for the corresponding queue, performance may be degraded.

In short, it may be better to use the first dedicated server during the development phase, because there is less intermediate complexity and there are generally fewer connections during development. In the practical application environment where multiple applications use one database at the same time, it may be better to adopt the second method, because if there are suddenly 1000 or 10000 request connections, the database server can't stand it if 10000 connections are established at the same time. Of course, we should also see how to make a decision on the actual situation at that time. There is no absolute difference between which is good and which is not.

The above are all the contents of the database connection, thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report