What is a session?
In layman's terms, a session is a context in which both parties communicate from the beginning of communication to the end of the communication. This context is a server-side memory: Logs the client machine for this connection, which application, which user is logged in, etc. [in PL/SQL developer, the session of the current database can be viewed through tools-->sessions]. The session is established at the same time as the connection, and both are descriptions of the same thing at different levels. Simply put, connection is the communication link between the physical client and the server segment, and the session is a logical interaction of the user's communication with the server. The session is applied to the Oracle hierarchy, not the operating system hierarchy. This parameter limits the number of concurrent logons to a specified instance without considering logging on through a dedicated server or a shared server.
One user in Oracle who logs on to an Oracle server assumes that the user has the "Create session" permission for Oracle. Oracle allows the same user to establish multiple connections to the same server on the same client, which can be seen from Oracle's view v$session [select * from V$session;]. Each session represents an interaction between the user and the server. Like two countries can carry out a lot of negotiations, economic, environmental and so on. The closure of negotiations on the economy will not affect the conduct of environmental negotiations. The background process Pmon will test the user connection status every once in a while, and if the connection is broken, Pmon will clean up the site and release the associated resources.
There are a number of scenarios in which connction and sessions are used in specific scenarios:
1. Sqlplus Login Oracle
This scenario is easier to understand, and a connection corresponds to a session.
2. Other Client Tools login Oracle
For example: PL/SQL Developer login to Oracle. PL/SQL Developer can set whether each window will share the same session. If you want to debug a stored procedure or function in the Debug window, you must set it to a shared session. If set to unshared, Www.linuxidc.com will open an action window each time, PL/SQL developer creates a new connection and session with the account and password that was originally entered.
3. IIS uses a program to log on to Oracle
In this case, IIS is actually logged on to Oracle. The establishment of the connection and session is related to the IIS mechanism.
"For Oracle, the number of security sessions should be sessions = (IIS process #) * (min pool size). ”
IIS process: In IIS6.0, a new process isolation mode is used to respond to a user's request, and in IIS Manager, you can set the maximum number of processes for the application pool. For new web App requests, IIS Process Manager initiates multiple W3wp.exe to respond.
http://blog.csdn.net/jlds123/article/details/6371563 What is process
Process: This parameter limits the number of operating system processes that can connect to the SGA (or the number of threads in the Windows system), which must be large enough to be applied to the background process and all dedicated server processes, in addition, The number of shared server processes and scheduling processes is also counted. In addition, the number of shared server processes and scheduling processes is also counted. Therefore, in a dedicated server environment, this is a way to limit the number of concurrent connections.
the relationship between session and process
The number of connections to Oracle (sessions) is related to the number of processes in its parameter file (process), and their relationship is as follows: Sessions= (1.1*process+5), if the resource is allowed and the current process count is too small, Then you can increase the number of PROCESSS (the session count depends on the number of process, generally do not directly modify the session number). The process in a Shared server corresponds to one or more sessions in Oracle. In dedicated server, a session corresponds to a process, but a process does not necessarily correspond to a session.
how to modify session and process
V$session each session that is connected to a database instance has a record. including user session and background process such as dbwr,lgwr,arcchiver and so on. V$process This view contains the current systemAll process information that is run by Oracle. is often used to establish a connection between the operating system process ID of an Oracle or service process and the database session. Show parameter sessions view current session configuration show parameter processes view current process configuration alter system set PROCESSES=1000 Scope=spfile Change the configuration, and you will need to restart the database when you are finished changing. Modifying the process in an Oracle configuration file
Oracle session and process relationships