Wednesday, May 20, 2009

The simplest query for checking what’s happening in a database

select event, state, count(*) from v$session_wait group by event, state order by 3 desc;SQL> select sql_hash_value, count(*) from v$sessionwhere status = 'ACTIVE' group by sql_hash_value order by 2 desc;select sql_text,users_executing from v$sql where hash_value = &hash_value;

No comments:

Post a Comment

About Me

Working as Oracle DBA for Wipro Technologies, Chennai, India