Re: Long Running query alert and kill process

From: Powell, Mark <>
Date: Thu, 3 May 2018 19:43:29 +0000
Message-ID: <AT5PR8401MB06265FE68874E302CF02A78ACC870_at_AT5PR8401MB0626.NAMPRD84.PROD.OUTLOOK.COM>

And here is the SQL manual entry for ALTER SYSTEM CANCEL SQL for those who want to take a quick peek

Mark Powell
Database Administration
(313) 592-5148

From: <> on behalf of Yong Huang <> Sent: Thursday, May 3, 2018 10:03:42 AM
Subject: Re: Long Running query alert and kill process


Not directly answering your question. In Oracle 18c, you can cancel the long running query instead of killing the session: Manual termination of run-away queries
A SQL query consuming excessive resources, including parallel servers, can be terminated using the ALTER SYSTEM CANCEL SQL statement.

As to monitoring a long-running query, I have a cron job that checks v$session_longops (joined to v$session) for elapsed_seconds. The job sends an email to me instead of killing the session. I'm sure OEM can do this too.

Yong Huang

-- Received on Thu May 03 2018 - 21:43:29 CEST

Original text of this message