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

Oracle maximum number of connections Number of concurrent connections The relationship between the

two parameters: sessions=1.1*processes+5

The current summary statement is very useful in checking the connection status of the data. It is helpful to check the release of the database connection while testing the code after writing the program. To analyze and optimize a robust system program.

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

2.
Sql code
1. select value from v$parameter where name ='processes'
select value from v$parameter where name = 'processes'--the 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 ; --Check
which users are currently using data

6.
Sql code
1.select count(*) fromv$session 
select count(*) from v$session --current session connection number

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;

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327070625&siteId=291194637