continuously run a query in sql prompt
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!