Dear All,
I have to restart the Server , But I dont know howmany of clients using the Particular Database?,(web technology project)
I tried with below query, But it not shwoing the details, shows only the
sql connections in local , But i want to trace who are using throgh the appications, is it possible, ?
SELECT
A.NAME,B.LOGIN_TIME,B.LAST_BATCH,B.STATUS,B.HOSTNAME,
B.NT_USERNAME ,B.LOGINAME ,B.PROGRAM_NAME, C.CLIENT_NET_ADDRESS,C.CLIENT_TCP_PORT
FROM SYS.SYSDATABASES A
INNER JOIN
MASTER.DBO.SYSPROCESSES B
ON
A.DBID = B.DBID
LEFT OUTER JOIN
SYS.DM_EXEC_CONNECTIONS C
ON
B.SPID = C.SESSION_ID
WHERE
A.NAME = 'DB Name'