<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Running KILL in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14427260#M4944752</link>
    <description>Rereading this, it appears that you tried to kill a process that was your own connection via isql/dbisql. If no other spid showed, that implies that the connection did clean up. For now I would suggest examining the actual application to see if it is coded correctly instead of trying to debug ASE or the driver.</description>
    <pubDate>Thu, 25 Jun 2026 12:27:52 GMT</pubDate>
    <dc:creator>ChrisBaker</dc:creator>
    <dc:date>2026-06-25T12:27:52Z</dc:date>
    <item>
      <title>Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaq-p/14404704</link>
      <description>&lt;P&gt;Hi, ALL,&lt;/P&gt;&lt;P&gt;This is a follow-up to&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/t5/technology-q-a/debugging-software-that-connects-to-sap-ase/qaa-p/14401469#M4942656" target="_blank"&gt;https://community.sap.com/t5/technology-q-a/debugging-software-that-connects-to-sap-ase/qaa-p/14401469#M4942656&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried to use Google. Turns out comparing to other DBMSes, like SQL Server, Postgres or MySQL, SAP ASE does not clean up if the connection is broken unexpectedly, just as I suspected in the last post in the linked thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, when I tried googling, it suggest to do following:&lt;/P&gt;&lt;P&gt;1. Run sp_who to identify the (still) running process.&lt;/P&gt;&lt;P&gt;2. Run "KILL &amp;lt;spid&amp;gt;" to kill the process that is stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I ran "dbisql", connect as "sa" and then ran "sp_who". It succeeded and gave me the spid of the process that is stuck.&lt;/P&gt;&lt;P&gt;Next I I tried to run "KILL" on that spid. However I got an error saying that I can't kill the process that I started.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I do?&lt;/P&gt;&lt;P&gt;I presume that even if I create a user in the "sa" domain, it will not be able to kill the process, because it started as "sa"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or not?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if not - how to create a user in "sa" domain?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2026 06:30:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaq-p/14404704</guid>
      <dc:creator>oneeyeman1</dc:creator>
      <dc:date>2026-05-27T06:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14405610#M4942984</link>
      <description>&lt;P&gt;The process you see 'Running' should be your current dbisql process but not the mentioned 'hanging/zombie' process from gdb.&lt;BR /&gt;The Error '6104 -&amp;nbsp;You cannot use KILL to kill your own process' will raise when you are trying to kill your &lt;STRONG&gt;current&lt;/STRONG&gt; process.&lt;/P&gt;&lt;P&gt;You can verify your current spid by execute this command in dbisql:&lt;BR /&gt;select&amp;nbsp;@@spid&lt;BR /&gt;&lt;BR /&gt;To verify if there are hanging process in ASE server you can run:&lt;BR /&gt;select * from master..syslogshold&lt;BR /&gt;go&lt;BR /&gt;&lt;BR /&gt;Are there spids returned? Check the timestamp to find which corresponds to the process of when gdb connected ASE. Then try to kill that spid.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2026 05:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14405610#M4942984</guid>
      <dc:creator>bo2l</dc:creator>
      <dc:date>2026-05-28T05:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14405898#M4943021</link>
      <description>What 'status' reported by sp_who is indicating that a spid requires 'kill'ing? How is the connection being broken unexpectedly??</description>
      <pubDate>Thu, 28 May 2026 12:06:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14405898#M4943021</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2026-05-28T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14406157#M4943049</link>
      <description>&lt;P&gt;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/189912"&gt;@ChrisBaker&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;"status" reported is "RUNNING" and the "cmd" is "INSERT".&lt;/P&gt;&lt;P&gt;I was debugging my software and hit the bug. So I close debugging session and so the connection should be closed, all transaction rolled back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2026 18:18:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14406157#M4943049</guid>
      <dc:creator>oneeyeman1</dc:creator>
      <dc:date>2026-05-28T18:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14406162#M4943051</link>
      <description>&lt;P&gt;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/262089"&gt;@bo2l&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thx for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I tried to run "SELECT @@spid" and it returned the one process that was running from "sp_who".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to run the second query but it didn't return any records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, what does it mean?&lt;/P&gt;&lt;P&gt;This is what happened:&lt;/P&gt;&lt;P&gt;1. I ran my C++ code with gdb and hit a problem inside transaction.&lt;/P&gt;&lt;P&gt;2. I interrupted that session without COMMIT/ROLLBACK, fixed the issue and restarted the gdb session.&lt;/P&gt;&lt;P&gt;3. At this point the program got stuck in side BEGIN TRANSACTION.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After googling, I saw that the way forward is "sp_who/KILL".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know what can I do to identify the cause of my second gdb session to be stuck?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2026 18:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14406162#M4943051</guid>
      <dc:creator>oneeyeman1</dc:creator>
      <dc:date>2026-05-28T18:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14408227#M4943146</link>
      <description>I don't know much about the gdb/programming, but if syslogshold doesn't return any process and sp_who doesn't return other spids likely to be the 'gdb' process then the process should just not exist in ASE. From ASE perspective you can try restarting the server if possible.</description>
      <pubDate>Mon, 01 Jun 2026 02:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14408227#M4943146</guid>
      <dc:creator>bo2l</dc:creator>
      <dc:date>2026-06-01T02:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14408980#M4943208</link>
      <description>&lt;P&gt;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/262089"&gt;@bo2l&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;"select * from master..syslogshold" does not return any records.&lt;/P&gt;&lt;P&gt;I got that sequence trying to google.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Restarting the server does not help. Running the program still stuck in the "BEGIN TRANSACTION".&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2026 17:15:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14408980#M4943208</guid>
      <dc:creator>oneeyeman1</dc:creator>
      <dc:date>2026-06-01T17:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14426768#M4944704</link>
      <description>&lt;P&gt;Re: Nothing in syslogshold.&amp;nbsp; Restarting the (ASE) server does not help. (re) Running the program still stuck in the "BEGIN TRANSACTION".&lt;/P&gt;&lt;P&gt;How do you know you're stuck in "begin transaction" state.&amp;nbsp; &amp;nbsp;Is that something you see in the sp_who output in ASE?&lt;/P&gt;&lt;P&gt;The 'begin transaction" command doesn't block on anything, it would be an insert/update/delete (or maybe select) operation inside the open transaction (after the "begin transaction" statement) that actually blocks.&lt;/P&gt;&lt;P&gt;Once you re-run gdb, and your client program submits SQL to the ASE server that hangs, can you connect to the ASE server and run this SQL (shown here with the sqsh utility -mvert option to display rows vertically):&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select p.spid, p.status, p.hostname, hostpid=p.hostprocess, p.program_name, p.cmd, BlockedOnSpid=p.blocked,
  db=l.DBName,obj=object_name(l.ObjectID,l.DBID),l.LockID, l.LockState, l.LockType, l.LockLevel,
  WaitSecs=l.WaitTime, l.BlockedState, BlockedByLockID=l.BlockedBy
from master..sysprocesses p, master..monLocks l
where p.spid=l.SPID and p.spid!=@@spid
and BlockedState is not null
go -mvert&lt;/LI-CODE&gt;&lt;P&gt;You might see something like this:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;spid:            131
status:          recv sleep
hostname:        host22
hostpid:         2076467
program_name:    sqsh-2.4
cmd:             AWAITING COMMAND
BlockedOnSpid:   0
db:              mytest
obj:             mytbl
LockID:          262
LockState:       Granted
LockType:        exclusive intent
LockLevel:       TABLE
WaitSecs:        NULL
BlockedState:    Blocking
BlockedByLockID: NULL

spid:            305
status:          lock sleep
hostname:        host22
hostpid:         3178717
program_name:    sqsh-2.4
cmd:             LOCK TABLE
BlockedOnSpid:   131
db:              mytest
obj:             mytbl
LockID:          610
LockState:       Requested
LockType:        exclusive table
LockLevel:       TABLE
WaitSecs:        154
BlockedState:    Blocked
BlockedByLockID: 262&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2026 20:05:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14426768#M4944704</guid>
      <dc:creator>sladebe</dc:creator>
      <dc:date>2026-06-24T20:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Running KILL</title>
      <link>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14427260#M4944752</link>
      <description>Rereading this, it appears that you tried to kill a process that was your own connection via isql/dbisql. If no other spid showed, that implies that the connection did clean up. For now I would suggest examining the actual application to see if it is coded correctly instead of trying to debug ASE or the driver.</description>
      <pubDate>Thu, 25 Jun 2026 12:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/running-kill/qaa-p/14427260#M4944752</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2026-06-25T12:27:52Z</dc:date>
    </item>
  </channel>
</rss>

