Oracle counterpart to `pg_cancel_backend` Considering the Oracle statement ALTER SYSTEM KILL SESSION ... as... to some degree comparable to the PostgreSQL statement SELECT pg_terminate_backend():

Do you know of any Oracle analogy (better than ALTER SYSTEM KILL SESSION) for the PostgreSQL SELECT pg_cancel_backend()?



Reference: 9.26. System Administration Functions (PostgreSQL Documentation)

pg_terminate_backend  


  Terminate a backend. You can execute this against another backend that has exactly the same role as the user calling the function. In all other cases, you must be a superuser.


pg_cancel_backend  


  Cancel a backend's current query. You can execute this against another backend that has exactly the same role as the user calling the function. In all other cases, you must be a superuser.
Versions below 18c:

DBMS_RESOURCE_MANAGER

SWITCH_CONSUMER_GROUP_FOR_SESS Procedure

exec DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_SESS (sid, serial, 'CANCEL_SQL');



  If the group name is 'CANCEL_SQL', the current call will be canceled
  when other switch criteria are met.


From 18c:

ALTER SYSTEM


  cancel_sql_clause
  
  Use this clause to terminate an SQL operation that is consuming
  excessive resources, including parallel servers. You must provide the
  session id and the session serial number to identify the SQL statement
  that you want to cancel. If you do not provide these required
  arguments, the SQL statement will not run.
  
  session_id is required and stands for the session identifier.
  
  serial_number is required and stands for the serial number of the
  session.
  
  @instance_id is optional. If this argument is omitted, the instance id
  of the current session is used.
  
  sql_id is optional. If this argument is omitted, the SQL statement
  currently running in the specified session is terminated.


Example:

ALTER SYSTEM CANCEL SQL 'SID, SERIAL, @INST_ID, SQL_ID';