get list of connected users
-
Hi everyone! I need to get a list of users connected to a database. I want to implement a fuctionality in my application that allows users connected to the database to communicate. For instance one administrator in his office can request or send information to another in an office through the network. A user executing 'select * from master..sysprocesses' does not show all connected users but only the one executing the command. How do I get users to view list of connected users so that they select the one they need to communicate with? I'm using Sql Server 2005. Thanks in advance.
-
Hi everyone! I need to get a list of users connected to a database. I want to implement a fuctionality in my application that allows users connected to the database to communicate. For instance one administrator in his office can request or send information to another in an office through the network. A user executing 'select * from master..sysprocesses' does not show all connected users but only the one executing the command. How do I get users to view list of connected users so that they select the one they need to communicate with? I'm using Sql Server 2005. Thanks in advance.
I'm not sure, but I believe that you need to be a
sysadmin
member to view which other users are connected. Since you (probably) will not promote every user to an admin, I'd suggest rolling your own. It's quite easy to create a table with a username and a datetime of login. Insert the users' name when he/she logs in, delete it if they logout or are inactive for a specified period of time.Bastard Programmer from Hell :suss:
-
Hi everyone! I need to get a list of users connected to a database. I want to implement a fuctionality in my application that allows users connected to the database to communicate. For instance one administrator in his office can request or send information to another in an office through the network. A user executing 'select * from master..sysprocesses' does not show all connected users but only the one executing the command. How do I get users to view list of connected users so that they select the one they need to communicate with? I'm using Sql Server 2005. Thanks in advance.
You can look at these commands, but I beleive you need elevated permissions to see other people on the server. Maybe you could write a web service that connects to the database with Admin privs and returns the list of users for each request. This would allow you current user configuration no to change, just some additional functionality would be published. Just a thought. Remeber to vote. :cool:
-
You can look at these commands, but I beleive you need elevated permissions to see other people on the server. Maybe you could write a web service that connects to the database with Admin privs and returns the list of users for each request. This would allow you current user configuration no to change, just some additional functionality would be published. Just a thought. Remeber to vote. :cool: