Question Locked

How we find the connected system with server in server machine

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi All,

I am using SQL developer. Some client machines are connected to server. How i find the which IP address is presently connected to the server.

2 replies

by ic-it

Shamelessly copied from;
http://www.cryer.co.uk/brian/sqlserver/howtolistallconnectedusers.htm

The simplest way to list all users and processes is to use the system stored procedure:

sp_who

to list all active users:

sp_who 'active'

to list details about a particular user:

sp_who 'login-name'

the same information (and more) can be found by interrogating the system table master..sysprocesses, for example the following is equivalent to 'sp_who':

select spid, status, loginame, hostname, blocked, db_name(dbid), cmd from master..sysprocesses

but the table master..sysprocesses also provides additional information such as the login_time, program_name and others. For full details of the master..sysprocesses table refer to SQL Server Books Online.

This discussion is closed to new replies.