September 4, 2002 at 3:35 pm
We want to be able to find if any other apps or users are connected. I haven't been able to find a canned one, so I've written my own. Originally I had this query:
select *
from master.dbo.sysprocesses sproc
join master.dbo.sysdatabases sdb on sdb.dbid = sproc.dbid and name = 'Lela-Teli sample'
where sproc.waittype = 0x0000
This worked successfully on Windows 2000. Unfortunately, in Windows 98, the the waittype is listed as 0x800 instead of 0x0000. The code thinks no one else is connected, which is incorrect.
This is my new attempt:
select distinct spid
from master.dbo.sysprocesses sproc
join master.dbo.sysdatabases sdb on sdb.dbid = sproc.dbid and name = 'Lela-Teli sample'
where sproc.spid != @@spid
Does this look reasonable?
Steve
Steve Miller
September 4, 2002 at 4:19 pm
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply