Written by

IT Officer, Cellular Pathology at Calderdale and Huddersfield NHS Foundation Trust
Question Robert Steed · Oct 23, 2023

Stop a running SQL query quickly

This applies to embedded and dynamic SQL queries in Caché ObjectScript. If I attempt to terminate the process via Management Portal, nothing happens. Neither does Ctrl C nor closing the terminal window in which my program is running, nor setting a stop flag in a global which is read by the program on each loop iteration. The only way to stop the query appears to be restarting the Caché server (which is running locally on my PC).

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.7 (Build 721U) Fri Mar 18 2022 22:07:35 EDT

Comments

Ashok Kumar T · Oct 23, 2023

Hello @Robert Steed

Is the terminating process via SMP (System Operation>Process>SelectProcess Detail>Terminate) isn't working?

0
Robert Steed  Oct 24, 2023 to Ashok Kumar T

Hello @Ashok Kumar T 
No it doesn't work. It might if I waited indefinitely but of course I need to stop it quickly. The process is still running after attempting to terminate the process, routine %sqlcq.APEX.cls17.1

0
Robert Steed  Oct 27, 2023 to Bernd Mueller

Thanks but I'm using Caché and don't have that option.

0
Luis Angel Pérez Ramos · Oct 25, 2023

Have you tried killing the process from the Task Administrator of Windows?

You can get the ID process from System Operation > Process , open the Task Administrator an kill it.

With the ID you can look for it from the Task Administrator:

0
Robert Steed  Oct 27, 2023 to Luis Angel Pérez Ramos

I hadn't tried that - it works! Nice one - thanks.

0