0

I need some help on how to find all the users that are connected to one of my database. I should check this on weekends to find out all the users that connected during the week.

Thank you.

Shanky
  • 18,985
  • 4
  • 35
  • 58
  • You can check through the DMV like (select * from master.sys.dm_exec_connections where session_id>=51;) – Md Haidar Ali Khan Jul 23 '18 at 08:00
  • Why do you think that by checking who is connected on weekends you'll "find out all the users that connected during the week"? 2. One connects to server, not to database. If I do "use master; select * from db_1.dbo.tbl1 join db_2.dbo.tbl2" to which database I'm connecting? To master, to db_1, to db_2 or to 3 databases?
  • – sepupic Jul 23 '18 at 08:52