Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kiran
Starting Member
30 Posts |
Posted - 2002-09-06 : 20:17:44
|
How can i get number of "Active" connections to the sql server? I tried @@Connections , but it gives me number of connection since last SQL Server started.Thanks in advance.. |
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2002-09-06 : 22:18:56
|
This query may help - it was written in SQL 2000SELECT spid ,status ,sid ,hostname ,program_name ,cmd ,cpu ,physical_io ,blocked ,dbid ,convert(sysname, rtrim(loginame)) as loginname ,spid as 'spid_sort' ,substring( convert(varchar,last_batch,111) ,6 ,5 ) + ' ' + substring( convert(varchar,last_batch,113) ,13 ,8 ) as 'last_batch_char'from master.dbo.sysprocesses (nolock) |
 |
|
|
|
|
|
|