Check the maximum number of connections allowed and the current number of connections in oracle.

Source: Internet
Author: User
Oracle views the maximum number of connections allowed and the number of current connections among other information the relationship between the maximum number of concurrent connections in oracle: sessions1.1 * processes5 currently summarized statements, useful in viewing data connections, after writing the program, you can test the code and view the release of the database connection. This helps you analyze and optimize a robust system.

Check the maximum number of connections allowed and the current number of connections in oracle the relationship between the maximum number of connections and the number of concurrent connections in oracle: sessions = 1.1 * processes5 statement summarized at present, it is useful to view the connection status of data. After writing the program, you can test the code and view the release status of the database connection. This helps you analyze and optimize a robust system.

Check the maximum number of connections allowed and the current number of connections in oracle.

Maximum number of concurrent connections in oracle

Relationship between two parameters: sessions = 1.1 * processes + 5


Currently, the summary statement is useful in viewing data connections. After writing the program, you can test the code and view the release of the database connection, which helps you to analyze and optimize a robust system program.

1.
SQL code
1. select count (*) fromv $ process
Select count (*) from v $ process -- current number of database connections

2.
SQL code
1. select value from v $ parameter where name = 'processs'
Select value from v $ parameter where name = 'processs' -- maximum number of connections allowed by the database

3.
SQL code
1. alter system set processes = 300 scope = spfile;
Alter system set processes = 300 scope = spfile; -- modify the maximum number of connections:

4.
SQL code
1. shutdown immediate;
2. startup;
Shutdown immediate;
Startup; -- restart the database

5.
SQL code
1. SELECT osuser, a. username, cpu_time/executions/1000000 |'s ', B. SQL _text, machine
2. from v $ session a, v $ sqlareab
3. where a. SQL _address = B. address order by cpu_time/executionsdesc;
SELECT osuser, a. username, cpu_time/executions/1000000 |'s ', B. SQL _text, machine
From v $ session a, v $ sqlarea B
Where a. SQL _address = B. address order by cpu_time/executionsdesc;
-- View which users are currently using data

6.
SQL code
1. select count (*) fromv $ session
Select count (*) from v $ session -- Number of current session connections

7.
SQL code
1. select count (*) from v $ session wherestatus = 'active'
Select count (*) from v $ session where status = 'active' -- number of concurrent connections

8.
SQL code
1. show parameterprocesses
Show parameter processes -- Maximum connection

9.
SQL code
1. alter system set processes = value scope = spfile;
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.