Inactive Users?
-
10. října 2008 14:57
Im searching for a way to determine what users in OCS are inactive. Is it possible?
Is there a script or some way to query OCS to find out who is not using there (enabled) account? Or time since last logon?
Thanks
Eric
Všechny reakce
-
10. října 2008 17:57Moderátor
Presence is stored in a binary blob in the database but can be read using the appropriate OCS API call. Availability of Online but Idle is returned in the range of 4500 to 5999 and availability of Busy but Idle is returned in the range of 7500 to 8999.
-
10. října 2008 18:00
thanks for your response. But im searching for something else.
Im trying to determine users who have NEVER logged into OCS but are enabled for it. and/or users who have not logged into it in say 6months.
is that possible?
-
10. října 2008 19:07Moderátor
Gotcha. "Inactive" has a different meaning from a Communicator perspective. In any case, just grab the output of the UpdateTime column from the ResourceDirectory table and cross reference the ids with the Resource table to identify the users.
-
10. října 2008 19:25
they are all showing up with an UpdateTime that is in the past. Would this be acurate? As I am in OCS currently as is many other users.
Im looking at ResourceDirectory / UpdateTime
-
10. října 2008 20:44Moderátor
I'm sorry, I was clicking through too fast trying to multitask. That is the last time that the user object was updated. You may need an API call to read the last presence update. I'll tinker around with this a little later to see what I can find.
-
11. října 2008 20:25Moderátor
Sorry for the delay...crazy week. Run this query in SQL to return the last logon time.
Code Snippetselect hud.LastNewRegisterTime as "Last Logon",res.UserAtHost as "SIP Address" from rtcdyn.dbo.HomedUserDynamic hud join
(Select ResourceId, UserAtHost from rtc.dbo.Resource
group
by ResourceId, UserAtHost)res
on
hud.OwnerId=res.ResourceIdorder
by "Last Logon"This will return a list of users ordered from earliest logon time (starting with NULL) to latest.
-
11. října 2008 21:11
Worked perfectly! Thanks alot! -
11. října 2008 21:42Moderátor
Great! When you get a chance please mark the question as answered so that it helps others who may search for this later.
-
11. listopadu 2009 21:29
Sorry for the delay...crazy week. Run this query in SQL to return the last logon time.
select hud.LastNewRegisterTime as "Last Logon",res.UserAtHost as "SIP Address" from rtcdyn.dbo.HomedUserDynamic hud join
(
Select ResourceId, UserAtHost from rtc.dbo.Resource group by ResourceId, UserAtHost)res
order
by "Last Logon"on hud.OwnerId=res.ResourceIdThis will return a list of users ordered from earliest logon time (starting with NULL) to latest.
For OCS 2007 R2 this did not work for me. I had to use the change rtcdyn.dbo.HomedUserDynamic to rtcdyn.dbo.HomedResourceDynamic.
Then it gave the info I needed.