Skip to Content
Former Member
Jul 24, 2015 at 07:48 AM

How do I get the spid of Sybase when using JDBC


Hi All,

I'm developing a Search Engine to search on large data set, I support a WEB GUI for user to define search criteria and then click on Search button to execute. Because there is timed out value for the GUI (default 15 minutes), if the search engine does not response after the timed out, the call from WEB UI will be aborted. But the query still continue in background, that causes the CPU spike to 100%. There is only way to terminate the query by using sp_who procedure and kill command, but I have to do it manually. Is there a way to terminate corresponding spid by programming ? Is there Sybase API to provide the spid of JDBC connection, so that I can terminate it when timed out hits.


Khoa Tran