Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

continuously run a query in sql prompt

user-1221May 22 2013 — edited May 26 2013
Hi,

We want to run a query which shows current logged-in sessions, the query should run continuously from the sql prompt.

select inst_id NODE, count(*) Current_sessions from GV$SESSION where username IN ('XxX','XXX') group by inst_id order by 1;

Can it be implemented with some sort of stored procedure which runs in for loop with some time interval?

Any help would be highly appreciated.

Thanks in advance!
This post has been answered by EdStevens on May 25 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2013
Added on May 22 2013
15 comments
2,848 views