Thursday, December 9, 2010

SQL Query to find the users logged on to SMS console recently

select stat.MachineName as 'Accessing the console from',stat.Sitecode,att1.AttributeValue as 'UserName',att1.AttributeTime as 'Loggedin Time'
FROM vStatusMessages stat
left join v_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID
stat.MessageType = 768
and stat.Sitecode like '%'
and stat.Time <= getdate()
and stat.MessageID=30102
order by stat.Time desc

Description: This query gives you the list of users who have created a session with SMS console recently.


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home