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

oracle最大连接数、连接信息

2023-09-12 15:40编辑: www.jxszl.com景先生毕设
                                      oracle查看允许的最大连接数和当前连接数等信息


select count(*) from v$process where program=‘ORACLE’; --当前的数据库连接数

select value from v$parameter where name ='processes'--数据库允许的最大连接数
 
alter system set processes = 300 scope = spfile;--修改最大连接数: 修改之后需要重启数据库
shutdown immediate; --立即方式关闭数据库
startup;--重启数据库
 
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;
--查看当前有哪些用户正在使用数据
 
select count(*) from v$session  --当前的session连接数
 
select count(*) from v$session where status='ACTIVE' --并发连接数


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