查看每个oracle帐户的连接总数
select username,count(username) from v$session where username is not null group by username
缺省从 v$session 中不能直接获得客户端 IP,可以在数据库中创建一个追踪客户端IP地址的触发器:
create or replace trigger on_logon_trigger after logon on database
begin
dbms_application_info.set_client_info(sys_context('userenv', 'ip_address'));
end;
/
比较常用的显示客户端信息的sql:
select sid,serial#,username,program,machine,client_info
from v$session
where username is not null
order by username,program,machine;
查看当前Oracle的连接数
select count(*) from v$process;
查看数据库允许的最大连接数
select value from v$parameter where name='processes';
修改最大连接数
alter system set processes=300 scope=spfile;
select username,count(username) from v$session where username is not null group by username
缺省从 v$session 中不能直接获得客户端 IP,可以在数据库中创建一个追踪客户端IP地址的触发器:
create or replace trigger on_logon_trigger after logon on database
begin
dbms_application_info.set_client_info(sys_context('userenv', 'ip_address'));
end;
/
比较常用的显示客户端信息的sql:
select sid,serial#,username,program,machine,client_info
from v$session
where username is not null
order by username,program,machine;
查看当前Oracle的连接数
select count(*) from v$process;
查看数据库允许的最大连接数
select value from v$parameter where name='processes';
修改最大连接数
alter system set processes=300 scope=spfile;