1.Establishing a connection
After oracle net names resolution is complete ,a connection request is passed from the user or middle-tier application to the Oracle Net Listener.
The listener receives a CONNECT packet and checks to see whether that CONNECT packet is requesting a valid Oracle Net service name..
If the service name is not requested ,the listener acknowledges the connect reqeust and does nothing else.If an invalid service name is requested ,the listener transmits an error code to the user process.
2.Delicated Server Process
If the CONNECT packet requests a valid service name,the listener spawns a new process to deal with the connection.This new process is known as the “server process” and is sometimes also referred to as the “shadow process”.After the process has been spawned,the listener no longer deals with the connection and all work is hander off to the server process.
The server process now transmits a RESEND packet back to the user process.
3.User Session
After the user session receives the RESEND packet ,it retransmits the CONNECT packet.With the session established ,the server process now acts as the user’s agent on the server..
4.User Sessions:Dedicated Server
With dedicated server processes there is a ont-to-one ratio between server processes and user processes.Each server process consumes system resources including CUP cycles and memory..If your system is being negatively impacted by the resource demands of the dedicated server architecture you have two options:
-
Increase system resources by adding more memory and additional CPU capability
-
Use the Oracle Shared Server architecture.
5.User Sessions:Shared Server
Each service the particepates in the Shared Server architecture has at least one(and usually more) dispatcher process.
When a connection request arrives ,the lister does not spawn a dedicated server process.Instead,the listener maintains a list of dispatchers available for each service name,along with the connection load for each dispatcher.
Unlike dedicated server processes ,a single dispatcher can manage hundreds of user session.
Dispatcher’s do not actually handle the work of user requests.Instead they pass user requests to a common queue located in the shared pool portion of the SGA
Shared Server processes take over most of the work of dedicated server processes,pulling reqeusts form the queue and processing them util complete.
6.Processing a Request
When a user connects through the Shared Server architecture submits a database reqeust:
-
The user process forwards the request to its dispatcher
-
The dispatcher places the request into the common request queue in the SGA
-
The next available shared server picks up the request from the request queue and process the request
-
The shared server places the response on the calling dispatcher’s response queue.Each dispatcher has its own response queue
-
The dispatcher retrueves the response from its response queue.
-
The dispatcher returns the response to the user.
After the user call has been completed,the shared server process is released and is available to service another user call in the request queue.
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199022/viewspace-1002779/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7199022/viewspace-1002779/