Using MON$STATEMENTS to Cancel a Query
Monitoring tables are read-only.However, the server has a built-in mechanism for deleting (and only deleting) records in the MON$STATEMENTS table, which makes it possible to cancel a running query.
| 
 Note 
 | 
 Notes 
  | 
Cancelling all active queries for the specified connection:
DELETE FROM MON$STATEMENTS
  WHERE MON$ATTACHMENT_ID = 32