Script to identify Oracle long running queries
![Oracle Database](https://i0.wp.com/www.techpaste.com/wp-content/uploads/2014/07/Oracle-database.jpg?fit=232%2C276&ssl=1)
Below query can be used to check what are the Script to identify Oracle long running queries in database .
set linesize 100
col opname format a20
col target format a15
col units format a10
col time_remaining format 99990 heading Remaining[s]
col bps format 9990.99 heading [Units/s]
col PERCENTAGE_COMPLETE format 90.99 heading “complete[%]”
select sid,
opname,
target,
sofar,
totalwork,
units,
(totalwork-sofar)/time_remaining bps,
time_remaining,
sofar/totalwork*100 PERCENTAGE_COMPLETE
from v$session_longops
where time_remaining > 0
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.