December 28, 2012

Obtain JAVA users from the UME tables

On SAP JAVA systems the users are stored on the UME tables (As far as the system is configured to be its own UME).
On the UME_STRINGS table you will not only found the users but also de roles and users ACLs. In this case as we only want to filter a list of users, we can filter the PIDs that start with USER and generate a list of the users on the system. We'll also need to obtain the column VAL and the column ATTR (As the value stored on the column VAL is the value of the attribute stored on the ATTR column of the same row)

Example query for Microsoft SQL:

select PID, ATTR, VAL
from SAPTSTDB.UME_STRINGS
where PID like 'USER.%' ORDER BY PID ASC