"景先生毕设|www.jxszl.com

oracle最大连接数查询和当前连接数

2023-09-12 15:40编辑: www.jxszl.com景先生毕设
oracle最大连接数查询和当前连接数
I. --当前的session连接数
select count(*) from v$session
 
II.--并发连接数
select count(*) from v$session where status='ACTIVE' 

III.--最大连接
show parameter processes
 
IV. --当前的数据库连接数
select count(*) from v$process where program=‘ORACLE.EXE(SHAD)’;

V. --数据库允许的最大连接数
select value from v$parameter where name ='processes'

VI.--修改最大连接数:
alter system set processes = 300 scope = spfile;

VII.--重启数据库
  1.shutdown immediate;  
  2.startup;

VIII.--查看当前有哪些用户正在使用数据
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;
http://www.itemperor.com/a/SQL/223.html


原文链接:http://www.jxszl.com/biancheng/shujuku/445615.html