SMS and Last User Logon
I had a question today regarding why a query showing the last logged on user was not returning the correct value.
Now this is a site that I am responsible for so I know there is nothing wrong with it. :o)
I had a quick look at the query, and found the answer straight away, I wonder why I have not seen this blogged before, or perhaps I have just missed it.
The query in question was accessing the User_Name0 field in the v_R_System view.
In case you are not aware v_R_System.User_Name0 is only updated during the last Network Discovery or Heartbeat Discovery.
So I always recommend using v_GS_COMPUTER_SYSTEM.UserName0 as this is updated when hardware inventory runs.
Now most places run their hardware inventory more frequently than their Network or Heartbeat discovery, hence my recommendation.