In the table dbo.Computer there is a field [PrimaryOwner], but it contains information about the user who made the setting, and I need to get the user name that is logged on
The table/column you want is Computer - LoginName that is the currently logged on user - HOWEVER make sure this does what you need.
LANDESK by default does not send the currently logged on user as soon as someone logs in. Also, it does not remove the last logged on user from that field if they logout.
You can change the Client Configuration/Inventory Settings so that an inventory scan is launched on login, but you might need to remove the randomised delay so it becomes more immediate. There is not a standard way to get LANDESK to remove the logged in user when someone logs out or the machine shuts down.
So if this is OK for you and the accuracy of the data is acceptable. Then great.
If you need it to be more accurate, then tae a look at our State Management module that plugs into LANDESK. The current user is collected and update real-time (amongst many other useful things) and might be worth looking at if you need more than can otherwise be provided. Link below.
MarXtar Ltd/MarXtar Corporation
LANDESK One Development Partner
The One-Stop Shop for LANDESK Enhancements