Oracle会话查询等
如何查看oracle当前连接数,会话数
查看session:
select * from v$session where username is not null
select username,count(username) from v$session where username is not null group by username
当前连接数:
select count(*) from v$process
查看连接数参数的设置情况
select value from v$parameter where name = 'processes'
Select count(*) from v$session where status='ACTIVE' #并发连接数 先查看哪些表被锁住了 selectb.owner,b.object_name,a.session_id,a.locked_mode fromv$locked_objecta,v$sessionb wherea.session_id=b.sidorderbyb.logon_time; 杀会话 altersystemkillsession'sid,serial#';
1.查哪个过程被锁 2.查是哪一个SID,通过SID可知道是哪个SESSION. 3.查出SID和SERIAL# 4.杀进程 (1).先杀ORACLE进程: ALTERSYSTEMKILLSESSION'查出的SID,查出的SERIAL#'; (2).再杀操作系统进程: KILL-9刚才查出的SPID 或 ORAKILL刚才查出的SID刚才查出的SPID (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |