Oracle views information such as the maximum number of connections allowed and the current number of connections

Source: Internet
Author: User

The current summary of the statement, in view of the data connection is very useful, after writing the program while testing the code side to see the release of database connections to help optimize the analysis of a robust system program.

1.
SQL code
1.select Count (*) from v$process

--Current number of database connections
Select COUNT (*) from v$process;

2.
SQL code
1.select value from V$parameter where name = ' processes '

--Maximum number of connections allowed for the database
Select value from v$parameter where name = ' processes;

3.
SQL code
1.alter system Set processes = + scope = SPFile;

--Modify the maximum number of connections:
alter system SET processes = + scope = SPFile;

4.
SQL code
1.shutdown immediate;
2.startup;
Shutdown immediate;
startup;--restarting 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$sqlarea b
3.where a.sql_address =b.address ORDER by cpu_time/executions Desc;
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/executions Desc;
--See which users are currently using the data

6.
SQL code
1.select Count (*) from v$session

--The current session connection number
Select COUNT (*) from v$session;

7.
SQL code
1.select Count (*) from v$session where status= ' ACTIVE '
Select COUNT (*) from v$session where status= ' ACTIVE '--Number of concurrent connections

8.
SQL code
1.show parameter processes

--Maximum Connection
Show parameter processes;

9.
SQL code
1.alter system Set processes = value scope = SPFile;

Oracle views information such as the maximum number of connections allowed and the current number of connections

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.