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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Number of Connections

Author  Topic 

acko
Yak Posting Veteran

52 Posts

Posted - 2003-08-21 : 09:11:14
Hi
How can I find out the number of connections to spcific data base.
Thanks
Alex

mr_mist
Grunnio

1870 Posts

Posted - 2003-08-21 : 09:32:44
sp_who2 ?
Or try detaching it from EM and it will tell you how many active connections there are.

-------
Moo. :)
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-08-21 : 18:37:56
select count(*) from master..sysprocesses where db_name(dbid) = 'mydbname'

oops

select count(distinct spid) from master..sysprocesses where db_name(dbid) = 'mydbname'


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -