Dedicated server process (dedicated server)
For a dedicated server configuration, Oracle always creates a new process at logon, which is dedicated to this connection service during the lifetime of the session. For each session, a new dedicated server will appear, with a one-to-one mapping between the session and the dedicated server. By definition, this dedicated server is not part of the instance of the user process and the server process is separate. Each user process has its own server process.
User processes and server processes can be run on different machines to take advantage of distributed processing.
The ratio of user processes to server processes is 1:1.
Even if the user process does not issue a database request, the dedicated server also exists, just to remain idle.
When to use a dedicated server
Submit a batch job (expect little or no idle time)
Connect as SYSDBA to start, shut down, or perform recovery
To request the use of a dedicated server, you must be in the Oracle Net TNS connection string within the Tnsnames.ora file
Contains the server=dedicated clause.
Note: For most platforms, if your machine has enough memory to support a dedicated server, you should use a dedicated service
Service. This can be a better performance.
However, there are exceptions, such as Windows NT, in which the asynchronous nature of the shared server architecture makes
Performance may be improved with Oracle shared Server configuration.
How to connect to a dedicated server
Set in the Tnsnames.ora file in the client server:
Dedicated = (DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST =192.168.1.52) (PORT = 1521))
)
(Connect_data =
(service_name = Itpux)
(Server = dedicated)
)
)
Shared server, which is formally said to be a multithreaded server (multi-threaded server) or MTS. In this way, no additional threads or new UNIX processes are created for each user connection
Benefits of Oracle Shared Server
Reduce the number of processes for a routine
Increase the number of users that can be serviced
Implementing Load Balancing
Reduce the number of idle server processes
Reduce memory footprint and system overhead
How to connect to a shared server
You cannot use a shared server to perform certain types of database work:
Database management
Backup and restore operations
Batch and bulk load operations
Data Warehouse Operations
Shared servers have some of the following drawbacks
In general, we use the Oracle default dedicated server approach, there is no need for shared server mode. One is that we use middleware (such as: WebLogic) to the Oracle, the middleware itself has a connection pooling mechanism, the other is the oracle of this shared server is not good enough, there are many shortcomings.
1) The code path of the shared server is longer than the dedicated server, so it is inherently slower than a dedicated server.
2) There is the possibility of an artificial deadlock, because it is serial, and as long as a connection is blocked, all users on that server process are blocked and are highly likely to deadlock. Itpux Technology Network (http://www.itpux.com), China's most professional and comprehensive IT industry technology website.
3) There is the possibility of an exclusive transaction, because if a session has a transaction that takes too long to run, it exclusively shares the resource, and the other user can only wait, while the dedicated server, each client is a session.
4) Shared server mode restricts certain database features, such as: You cannot start and shut down instances individually, you cannot perform media recovery, you cannot use log Miner, and the sql_trace is meaningless (because it is a share instead of the current session).
How do I know if Oracle is currently a dedicated server or a SHARED server?
The simplest way is to view the listener: Lsnrctl Service
[[Email protected]:/home/grid] $lsnrctl serviceLSNRCTL for Linux: Version 11.2.0.4.0 - production on 15-jul-2017 13:07:31copyright (c) 1991, 2013, oracle. all rights reserved. connecting to (description= (address= (PROTOCOL=IPC) (key=extproc1521)) services summary ... service "+asm" has 1 instance (s) . instance "+asm", status READY, has 1 handler (s) for this service... handler (s): "Dedicated" established:0 refused:0 state:ready LOCAL SERVERService "Db01" has 1 instance (s). Instance "Udevasm", status ready, has 1 handler (s) for This service... handler (s): " Dedicated " established:8 refused:0 state:ready LOCAL SERVERService "Udevasm" has 1 instance (s) . instance " Udevasm ", status ready, has 1 handler (s) for this service... handler (s): "dedicated" established:8 refused:0 state:ready LOCAL SERVERService " Udevasmxdb " has 1 instance (s) . instance " Udevasm ", status ready, has 1 handler (s) for this service... handler (s): "D000" established:0 refused:0 current:0 max:1022 state :ready dispatcher <machine: udevasm, pid: 2469> (address= (protocol=tcp) (host=udevasm) (port=10275)) The command completed successfully
Oracle's private database and shared database differences