Until now is you want to cancel a sql you must kill (in the worst of the cases) or disconnect (in the best) the session who execute the statement. In the new release of Oracle (18c) you can “kill” a statement without kill the session. There are a new clause “cancel sql” into the “alter system” to perform this action.
You need the sqlid and the sid and serial# for session executing the sql_id which you want to kill. The format is show below;
alter system cancel sql ‘sid, serial#, sql_id’;
and an example;
alter system cancel sql ‘403, 35122, 77jhfmw06g05u’;
HTH – Antonio NAVARRO