spid

How do I kill an unruly spid in Sybase?

I've got a couple of rogue spid's in my database that I can see are sleeping when I log in as sa and use sp_who, but attempts to use kill <spid> to eliminate them have failed and I don't actually have access to the server itself to bounce it. Is there any other way of killing these things off? ...

Identifying underlying sql connection of SqlConnection object

I can use GetHashCode() to identify an object but is there any way to identify the actual sql connection obtained by a SqlConnection object? I'm (still) trying to debug a problem involving pooled connections and application roles and if I could reliably identify the underlying sql connection it could help a lot. Here's some code that m...

Getting the spid of a Powerbuilder database Connection?

I've been trying to find some manual information on this, but my search is fruitless. I'm trying to see if there is a way to find the unique spid (from sp_who) of a connection into a database from Powerbuilder. As in, a user logs in, and I can see their sp_who record, but I want to be able to obtain and manipulate this id in the applic...

Is KPID globally unique within Sybase?

Can a KPID (as select kpid from master..sysprocesses) be assumed to be globally and always unique? (I've found that for my small sample set KPID(n+1) ~= KPID(n) + 65536 (2^16) but I want to know if I can assume, previous db connections kpid is unique, even if it's previous loginame and spid match a new loginame and spid) Cheers. BLT....

Can I share a single database connection between ODBC and ADO?

Is it possible to have an ODBC connection and an ADO connection share the same underlying SQL Server connection, so that both are using the same SPID? Currently I am using SQLDriverConnect and ADODB::_ConnectionPtr->Open. I can make these connections in either order, so perhaps it's possible to open one making use of the other? (Langua...

What is the relationship between a SPID and a Connection in SQL server?

Can a SPID be used by two connections, while both connections are open? If a connection is returned to a connection pool, will it hold on to the SPID? ...

How can I prevent ADO from creating multiple SPIDs?

I'm working on an application that creates a single ADO connection and keeps it open for the lifetime of the application. I have connection pooling turned off. (Please ignore the fact that this might not be best practice for the purposes of this question). If I spawn a new thread and use the exact same ADO connection, it uses a new SPI...

What is the relationship between open SqlConnections in the client app and processes in SQL Server?

I just tried to make a simple schema change to a table in a SQL Server database (by using the Design tool in SMSS). Whenever I tried to save the change, it kept timing out. I wondered whether this was due to existing connnections which were 'locking' the table. I decided to kill connections as an experiment. I queried master..sysprocess...