DQL to query the list of users in a group
- select users_names from dm_group where group_name = ‘mygroup’;
DQL to query the list of active users (Users who can log in) in a group:
- select user_name from dm_user where user_state = 0 and user_name in (select users_names from dm_group where group_name = ‘mygroup’);
user_state of dm_user indicates the user’s current state.
Valid alues are:- 0, indicating a user who can log in.
- 1 indicating a user who cannot log in.
- 2 indicating a user who is locked.
Why can’t we use select i_all_users_names from dm_group?
Whats the difference between these two attributes:
users_names and i_all_users_names
Kind Regards,
Ashsh Srivastava
Comment by Ashish — December 6, 2007 @ 7:58 am
users_names attribute lists the direct users part of that group.
i_all_users_names is a computed attribute by the server that lists all the users directly and indirectly (users of a sub group and further). This may give different results based on the scope
Comment by Rajendra — January 3, 2008 @ 11:26 am
It might be worth noting that selecting i_all_users_names in your query might get you different results because Documentum is performing some sorts of inner joins and sub-selects to find all users and thus groups that do not have any user will not be listed.
Compare for example:
select count(distinct group_name) from dm_group where ANY users_names IS NULL or ANY users_names IS NOT NULL– this will list all groups;and
select count(distinct group_name) from dm_group where ANY i_all_users_names IS NULL or ANY i_all_users_names IS NOT NULL– this will only select groups with at least one user.Comment by Valery — January 16, 2008 @ 1:49 pm
I need to get a qurey that will give me a list of groups that are common in acls. Can anyone help?
Comment by Vladimir — May 6, 2010 @ 8:25 pm
Hi,
I have a requirement to replace a particular user name present in all available groups with some other user name. Firstly, I am trying to get the user name from group by executing simple query
as follows:
select users_names from dm_group where group_name = ‘zmg_rm_bayswater_w’
But it is not listing users_names within it. It shows a blank result without any error mesasge. I tried to get the query executed through i_all_users_names but it does not show any result.
Please help me with the solution to fix this issue. It would be great if I am updated about the result on my mentioned email address.
Regards
Avi
Comment by Avi Bansal — March 8, 2011 @ 3:57 am