posted 3/21/2010 8:02:22 PM by indupriya
There are three ways to find who is connected to a database in sqlserver.
First one:
Second One:
Third One:
select spid, status, loginame, hostname, blocked, db_name(dbid), cmd from master..sysprocesses where db_name(dbid) = 'databasename'
This gives the status, login name and host name for the database you specify.
indupriya (Member since: 2/22/2010 1:45:30 PM)
View indupriya 's profile
Leave a comment
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address: