This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

sql query to get the role assigned/revoked in last 7 days in OIM?

2656016
2656016 Member Posts: 22
edited Jun 2, 2014 9:56AM in Identity Manager


hi all,

does anyone have sql query to get the role assigned/revoked in last x days?

the query output should be

userlogin,rolename,status(revoked/assigned)

TIA

Answers

  • Kevin Pinsky
    Kevin Pinsky OIM Architect/Senior OIM Developer/OIM GURU Fishers, INMember Posts: 5,322 Silver Crown

    It's all in the table upa_grp_membership.

    -Kevin

    Kevin Pinsky
  • 2656016
    2656016 Member Posts: 22
    edited Jun 2, 2014 10:01AM

    thanks.

    here are the query i used:

    select usr.usr_login,LISTAGG(ugp.ugp_name, ';') WITHIN GROUP (ORDER BY ugp.ugp_name) from identmgr.upa_grp_membership,identmgr.usr,identmgr.ugp,identmgr.upa_usr

    where usr.usr_key=upa_usr.usr_key  and upa_grp_membership.status='Active' AND ugp.ugp_key=upa_grp_membership.ugp_key and upa_grp_membership.upa_usr_key=upa_usr.upa_usr_key and

    TRUNC(upa_grp_membership.CREATE_DATE) > TO_DATE('2014-06-01', 'YYYY-MM-DD') group by usr.usr_login;

    select usr.usr_login,LISTAGG(ugp.ugp_name, ';') WITHIN GROUP (ORDER BY ugp.ugp_name) from identmgr.upa_grp_membership,identmgr.usr,identmgr.ugp,identmgr.upa_usr

    where usr.usr_key=upa_usr.usr_key  and upa_grp_membership.status='Revoked' AND ugp.ugp_key=upa_grp_membership.ugp_key and upa_grp_membership.upa_usr_key=upa_usr.upa_usr_key and

    TRUNC(upa_grp_membership.CREATE_DATE) > TO_DATE('2014-06-01', 'YYYY-MM-DD') group by usr.usr_login;

This discussion has been closed.