Quote:
>> Hi. I have been having some problem for killing a connection. My C program using
>> DB-Library sometimes died(the whole process is terminated), but left a connection
>> to sybase. It can be seen by sp_who. Using KILL(as sa) is only effective when the
>> C program is alive. These connection will hang out there until the server is
>> recycled. I don't know if these dead connections still consume much server resource
>> Is there a easy way to get rid of them ? Thanks
>Yes, these 'hung' processes take up resources. And if the process hung
>while accessing a table (insert, update, select w/ table lock) you could
>end up locking out other processes.
>As for the 'kill' command . . . it don't always work . . as you've seen.
>You could always use the 'syb_terminate spid' command but since that's
>an undocumented command you don't know about it . . right! ;-)
Please only use this undocumented and unsupported command when you
really REALLY want to corrupt your database... I have lost track of the
number of times this command has screwed up our customer's db's, it
is extremely dangerous and should only be used when you are certain
that the process you are killing did not go to sleep having
uncommitted updates outstanding (and I'm not even 100% sure it
can't{*filter*}the db up anyway...). The ONLY safe way to remove
{*filter*} server processes is to restart the server. Sybase are well
aware of the need for a better method, an active "kill" that would
not risk the db's integrity and are working on it for a future
version of System 10 (but not likely in 10.0 from what I have
heard).
Quote:
>Mark
Regards
David S. Open Vision Systems - Sybase distributor, Australia.