Home All Groups Group Topic Archive Search About

Get list of connected users on database?

Author
22 Jul 2006 5:39 PM
Retf
Hi All,

How I get list of users that stay connected on my data base?

Thanks

Author
22 Jul 2006 5:47 PM
naka55n
Is sp_who what you are looking for?

--
Mark Graveline
mgraveline"at"sqlchallenge.com
http://www.sqlchallenge.com
Look, Learn, Have Fun & Win -- Database Competitions


Show quote
"Retf" <re***@terra.com.br> wrote in message
news:%23LE5mUbrGHA.248@TK2MSFTNGP04.phx.gbl...
> Hi All,
>
> How I get list of users that stay connected on my data base?
>
> Thanks
>
Author
22 Jul 2006 5:48 PM
Barry
Retf wrote:
> Hi All,
>
> How I get list of users that stay connected on my data base?
>
> Thanks

sp_who or sp_who2

HTH

Barry
Author
22 Jul 2006 5:53 PM
Narayana Vyas Kondreddi
Run sp_who and it will show you all the users connected to your SQL Server.
One of the output columns will show you the database name. Alternatively,
you could query master..sysprocesses table where dbid = your database id.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @ http://vyaskn.tripod.com/



Show quote
"Retf" <re***@terra.com.br> wrote in message
news:%23LE5mUbrGHA.248@TK2MSFTNGP04.phx.gbl...
> Hi All,
>
> How I get list of users that stay connected on my data base?
>
> Thanks
>
Author
22 Jul 2006 6:06 PM
Roy Harvey
Note that master..sysprocesses also lets you see when the connection
was first made, and when the last batch of commands started.

Also be aware that a user may be accessing your database without
"using" it.  They might have a default of master, for example, but be
executing a stored procedure on your database:
EXEC yourdb..someproc

Roy Harvey
Beacon Falls, CT

Show quote
On Sat, 22 Jul 2006 14:39:49 -0300, "Retf" <re***@terra.com.br> wrote:

>Hi All,
>
>How I get list of users that stay connected on my data base?
>
>Thanks
>

AddThis Social Bookmark Button