(转)oracle 查看数据库连接备忘
http://yezi.iteye.com/blog/127210
2007-09-26
oracle 查看数据库连接备忘
关键字: oracle
Java代码
- select count(*) from v$session where username is not null order by machine;
- select * from v$session where username is not null order by machine;
- select count(*) from v$session where username is not null and machine='test1' order by machine ;
- select count(*) from v$session where username is not null and machine='localhost.localdomain' order by machine ;
- select * from v$process where username is not null ;
- select * from V$SHARED_SERVER_MONITOR ;
- SELECT * FROM v$open_cursor;
- SELECT sql_text,COUNT(*) FROM v$sql s , v$session se WHERE se.prev_hash_value =s.hash_value GROUP BY sql_text;