title: In DB2 SQL, how can I kill a recursive function call that's already stuck in an infinite loop..?
body: <p>If I have a DB2 SQL procedure or function that's recursive, or it has a tricky loop, and the process has become infinite, how can I kill it if it's already running..? This is DB2-for-i v7.3, with development in DBeaver SQL.</p>
  
  <p>Is it enough to simply cancel the query in the SQL IDE..? I've done so in the past with too-long queries, and I always get a notification for "Query has been cancelled". But with an infinitely looping or recursing procedure, is there any risk the process might still continue in the background until something crashes and the DBA staff come to pound on my door with pitchforks and flaming torches..?</p>
  
  <p>EDIT: It was suggested my question is a duplicate of <a href="https://stackoverflow.com/questions/53538273/how-to-break-the-loop-in-db2-database">this one</a>, but I read that one before my post, and it's not the same. That question is how to prevent an infinite loop from happening in the first place, but my question is about how to kill one that's already happening. </p>