Oracle view number of connections __oracle

Source: Internet
Author: User

Sometimes you have to go to the database and sometimes you can't even.

It is possible that the current number of connections on the database has exceeded the maximum value that it can handle.

Select COUNT (*) from v$process--current number of connections
Select value from v$parameter where name = ' processes '--maximum number of connections allowed by the database

To modify the maximum number of connections:
alter system SET processes = Scope = SPFile;

To restart the database:
Shutdown immediate;
Startup

--See which users are currently using the data
SELECT Osuser, a.username,cpu_time/executions/1000000| | ' S ', Sql_fulltext,machine
From V$session A, V$sqlarea b
where a.sql_address =b.address order by cpu_time/executions Desc; Select COUNT (*) from V$session #连接数


Select COUNT (*) from v$session where status= ' ACTIVE ' #并发连接数
Show parameter Processes #最大连接
alter system SET processes = value scope = spfile; Restart database #修改连接

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.