Maximum number of connections for a user
To view the maximum number of connections for this user
Select profile from dba_users where username= ' app_test ';
SELECT * from Dba_profiles where profile= ' pf_app_test ' and resource_name= ' sessions_per_user ';
View the current number of connections for this user
Select COUNT (*) from v$session where username= ' app_test ';
To view the maximum number of connections allowed by an instance
Select sum (limit) max_allowed_sessions from dba_profiles where resource_name= ' sessions_per_user ' and ' limit ' DEFAULT ', ' unlimited ');
View the maximum number of connections for the current instance
Select COUNT (*) from v$session;
To modify the maximum number of connections for a user
Alter profile pf_app_test limit Sessions_per_user 20;
Description
Sessions
SESSIONS Specifies the maximum number of sessions allowed for the database, and the range of parameter values is 31 power of 1~2 and cannot be modified dynamically. The default value in ORACLE 11gr2 is (1.5*processes) +22.
processes specifies the maximum number of concurrent user processes that are allowed to connect to an Oracle database at the operating system level. This value can be set relatively small in shared server mode.
Summarize:
When initializing a database instance, you need to set an appropriate value for sessions, processes, and avoid the problem of "the maximum number of connections allowed by the instance" < "sum of the maximum number of connections for all users" as the business grows.
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/