If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Problem with system table 'sysprocesses'

Hello,

I suppose that it's well known problem... and may be simple to solve it. I use ASE 11.0.3. I connect to the database from my application. Running my application it's necessary to log in. Than in system table 'sysprocesses' my process appears... When I exit my program (disconnect from the database) table 'sysprocesses' refreshes and my process is no longer there. But when I disconnect physicly for example by reseting the computer my process still exists in 'sysprocesses'... I want to find out that the concrete process is no longer connected to the database, so I check 'sysprocesses' looking for a concrete 'spid' number. My number is there but it should be in fact. How to refresh that table or how to find out that I'm no longer connected...?

sysprocesses infact is a system view. What that means is you cannot refersh it.

Normally the SQL Server engine would clean the dead spids. In your case if you are seeing the spid still active(runnable) in the sp_who output. This means it has now become an phantom spid. I'm not sure what you can do about it other than shutdown and restart SQL Server.