How to set the number of Oracle database connections

Source: Internet
Author: User
Tags count sessions oracle database

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/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.