Querying for active roles

How would you pull back the names of all roles that a user is currently operating through?
Something like:
SELECT role_name FROM user_roles;
Thanks
-Chuck

I found it:
select name from session_roles;
-cf

Similar Messages

  • Query for active tasks

    Im trying to query for worklist tasks associated with a running business process. Using the WorkListManager and TaskSelector, I use the TaskSelector method setListeningProcessUri("*", true) and also tried setListeningProcessUri(".+", true). I thought by setting the isPattern to true would return all tasks with a listening business process matching the pattern.
    Has anyone else used this method with a pattern?
    Thanks,
    Paul

    Hi Dinesh,
    Check the below steps for extracting AD users information using powershell,
    - Go to Start -> Open Windows Powershell using Run as Administrator 
    - In the powershell type set-executionpolicy unrestricted (for allowing commands to execute)
    - Type the cmdlet import-moduleactivedirectory (to enable and execute AD cmdlets)
    - Type the cmdlet Get-ADUser -Filter * -properties *  | select * (to get all AD Users, each with all properties)
    - To show only select information such as firstname, lastname etc,you need to replace the
    select * section in the previous command by select firstname, lastname etc.
    - Also to display the result in columns, you can type the command as
    Get-ADUser -Filter * -properties *  | select firstname, lastname | ft
    To run as a powershell script, you can copy the above commands to a notepad and save it as a .ps1 file.
    NOTE: if you wish to run the script from client machines like Windows 7, you need to enable RSAT.
    Checkout the below link on enabling RSAT,
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/08/29/use-active-directory-cmdlets-with-powershell-to-find-users.aspx 
    Regards,
    Gopi
    JiJi
    Technologies

  • What is the best way to query for the roles of a 2013 Lync server?

    I am new to Lync.
    I am not able to find, but if anyone already asked and got answers in this forum, or documentation I will be much appreciate. 
    I would like to programmatically ( powershell wmi most likely)
    Get-WmiObject –query ‘select * from win32_product’ | where {$_.name –ilike “*Lync*”}
    Typically returns a lot of installed components, is there a way to tell whether a lync ( 2013) installation and deployment is either a Front/Back, or Edge or Mediation?
    Thanks

    thanks. Although I was expecting  (hoping) to be able to query for roles like : Front/Back, Edge , Mediation, Director and etc.
    PS C:\Users\labuser> get-csservice | select PoolFqdn,Role,SiteId
    PoolFqdn                   Role                       SiteId
    lab-lync2013-01.lab.exc13  UserServer                 Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  Registrar                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  UserDatabase               Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  FileStore                  Site:lab-lync2013-01
    LAB-EXCH2013CAS            WacServer                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  WebServer                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ConferencingServer         Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  MediationServer            Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ApplicationServer          Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ApplicationDatabase        Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  CentralManagement          Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  CentralManagementDatabase  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  MonitoringDatabase         Site:lab-lync2013-01
    10.199.4.4                 PstnGateway                Site:lab-lync2013-01
    What if, I use get-counter instead?
    E.g. if I am able to get something returned for 
    \LS:A/V Edge - UDP Counters(_Total)\A/V Edge - Packets Dropped/sec  , then I know it has Edge role
    \LS:MediationServer then it has Mediation role
    But then I really cannot tell for sure for FF or just Standard Editor Server.
    It is the list of server roles described in here that I am interested in. I understand Lync is very flexible in terms of deployment roles.
    http://technet.microsoft.com/en-us/library/gg398536.aspx
    Thanks
    Ben

  • E Recruitment : Report/Query for Activity Status

    Hi,
    Is there a standard report/query which shows all the activities with their corresponding status and due dates.
    If not, can someone guide me how to capture this data, in terms of tables which store this details.
    Any inputs on this please....
    Thanks
    MM
    Edited by: abaphr_mm on Oct 29, 2010 6:56 PM

    Hi,
    could you give some additional information on your requirement?
    If you need support for the every day work of the recruiter there are standard bsp applications (up to ehp 3) and work sets (for ehp 4 sp 4 and higher) which show the planned activities and planned correspondences for them.
    If you need some statistic over all recruiters the are some infosets but I never used them as they never met the requirements in my projects. I'd probably write some report reading the activity infotypes (tables HRP5135 to HRP5142/43 or 45 depending on your e-rec release) directly. For statistics please keep in mind that recruiters tend to not complting all of their activities. So you might gather tons of data from candidacies / applications which belong to requisitions which are already closed.
    Best regards
    Roman

  • SNMP Query for active tunnels inaccurate

    Hi,
    I use the following OID: 1.3.6.1.4.1.9.9.171.1.3.1.1.0 to query my 3005 concentrator for the number of active tunnels. The number of tunnels averages around 4-8 at a time, but about 40% of the time, the returned value is 85. This is skewing my results.
    This may coincide with enabling WebVPN, but even the statistics on the web pages of the 3005 never even come close to this value.
    Any suggestions?
    Thanks,
    Dave

    show counters output might help you in analysis

  • Best Practice for BEX Query "PUBLISH to ROLE"?

    Hello.
    We are trying to determine the best practice for publishing BEX queries/views/workbooks to ROLEs. 
    To be clear of the process I am referring: from the BEX Query Designer, there is an option QUERY>PUBLISH>TO ROLE.  This function updates the user menu of the selected security role with essentially a shortcut to the BEX query.  It is also possible to save VIEWS/WORKBOOKS to a role from the BEX Analyzer menu.  We have found ROLE menus to be a good way to organize BEX queries/views/workbooks for our users. 
    Our dilemma is whether to publish to the role in our DEV system and transport to PROD,... or if it is ok to publish to the role directly in the PROD system.
    Publishing in DEV is not always possible, as we have objects in PROD that do not exist in DEV. For example, we allow power users to create queries directly in PROD.  We also allow VIEWS and WORKBOOKS to be created directly in PROD.  It would not be possible to publish types of objects in DEV. 
    Publishing in PROD eliminates the issues above, but causes concerns for our SECURITY team.  We would be able to maintain these special roles directly in PROD.
    Would appreciate any ideas, suggestions, examples of how others are handling this BEX publish-to-role process.
    Thank you.
    -Joel

    Hi Joel,
    Again as per the Best Practices.Nothing to be created in PRD,even if we create them in PRD for Power users its assumed as temprory and can be deleted at any time.
    So if there are already deviations then you can go for deviations in this case as well but it wont be the Best Practice.Also in few cases we have workbooks created in PRD as they cud nt be created in DEV due to various reasons...in such cases we did not think of Best Practice ,we had a raised an OSS on this aswell.
    In our Project,we have done everything in DEV and transported to PRD,in case there were any very Minor changes at query level we have done in PRD and immedialtely replicated the same in DEV so that they are in SYNC.
    rgds
    SVU

  • Authorizations for Publishing a Query in a Role

    Gurus,
    I have S_USER_AGR (activity as: 01, 02, 03 06, 78)  and S_RS_TOOLS as webpublish and Themes...but my users are not able to Publish a Query to a Role from Query Designer in a Edit mode, but they were able to add the Query to a Role using "Enter in Role" button from BEx pop up screen...what Authorizations I am missing in my role?
    And also in QA and Production how can the Power Users can publish a Query or a Wrk book to a Role without editing a Query or Work book?
    Can some one share their thoughts..
    Thanks,
    KK

    Hi,
    I also facing same issue in Query designer. Unable to publish the roles in query designer. It is showing no roles assigned to you error mesg. I have added this object and given the * values. Then the problem is solved.
    Please user s_user_agr object with activity * and values *. They will get access to publish to roles, portals and broadcasting in query designer.
    Regards
    anil.

  • Which authorizations are required for assigning a query to a role?

    Hi everybody,
    we try to set up some roles for "reporting power users". These guys should be alble to define new queries using BEx (works fine) and also should be able to assign these new defined queries to a role, so other users can use these roles.
    The idea is simple, but we're searching for the right authorization object (or - as i suppose - set of authorization objects) that enables the user to assign a query to a role (using that "enter to a role" button in the open / save dialog).
    At the moment, the user can user that button, and the role, he should the query assigned to is shown. After selecting the role and clicking button "create" it take some seconds and a message "error when saving. entry has not been created" is shown.
    Obviously, there is a problem with writing the role (or adding the new information to that role).
    So, could anyone help me and provide me with a list of authorization objects that are required.
    Thanks in advance,
      Alfred

    S_RFC
    S_TCODE
    S_USER_GRP
    S_BDS_D
    S_OD_SEND
    S_RS_AUTH
    S_RS_BCS
    S_RS_COMP
    S_RS_COMP1
    S_RS_FOLD
    S_RS_ICUBE
    S_RS_MPRO
    The above mentioned authorization objects are enough to add in the role and required for the accessing a query.
    particularly, S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE are the most important auth objects which are directly getting involved in authorization of a query in a role.
    SO, you have to assign the respective info area, info cube and info providers names in these auth objects.
    The same scenario , i am using in my project to give access to the queries in all the areas for my end users.
    The values and access/authorizations restrictions is up to your project requirement.
    Hope this would help you.

  • Querying Operational (Not DW) Database For Active Incidents

    I sure hope I am asking this in the correct forum...  Before I get started a little bit of background is needed...
    We (my company) are mostly happy with SCSM but the biggest request we hear about is that there is no easy way for technicians to see their Active/Pending tickets when out at locations.  We know about web analyst portals offered by 3rd parties such as
    GridPro, Cireson, et al. however the funding (we are in public education) for this has never been realized and the first request to get shot down.  For some reason I wondered if it would be possible to query the operational database myself for a list
    of incidents to appear and for some reason I decided to try it.  My knowledge of the inner workings of the SCSM databases (both operational and DW) are severely lacking but after 3 hours of looking around, Googling, and brute-forcing through it I have
    the following with the hopes of a free analyst portal/view...
    SELECT inc.Id_9A505725_E2F2_447F_271B_9B9F4F0D190C  AS ID
        , inc.Title_9691DD10_7211_C835_E3E7_6B38AF8B8104 AS Title
        , inc.Description_59B77FD5_FE0E_D2B5_D541_0EBBD1EC9A2B AS Description
        , inc.CreatedDate_6258638D_B885_AB3C_E316_D00782B8F688 AS CreatedDate
        , statusdisp.DisplayName AS IncidentStatus
        , AffectedUser.DisplayName AS AffectedUser
        , AssignedToUser.DisplayName AS AssignedToUser
        , classdisp.DisplayName AS Classification
        , locdisp.DisplayName AS Location
        , incExt.RoomNumber_24150BC7_9958_313D_8DD1_3CE2A0A68165 AS RoomNumber
        , incExt.AltSchedule_B1A8258C_1048_4D6E_AEB9_910811B94326 AS AltSchedule
    FROM MT_System$WorkItem$Incident (NOLOCK) inc
    INNER JOIN EnumType e ON 
    inc.Status_785407A9_729D_3A74_A383_575DB0CD50ED = e.EnumTypeId
    INNER JOIN DisplayStringView statusdisp ON e.EnumTypeName = statusdisp.ElementName
    AND statusdisp.LanguageCode='ENU'
    AND statusdisp.DisplayName!='Closed'
    AND statusdisp.DisplayName!='Resolved'
    INNER JOIN [ServiceManager].[dbo].[Relationship] AssignedToUserRel ON
    [BaseManagedEntityId] = AssignedToUserRel.[SourceEntityId]
    AND AssignedToUserRel.[RelationshipTypeId] = '15E577A3-6BF9-6713-4EAC-BA5A5B7C4722'
    INNER JOIN [ServiceManager].[dbo].[MT_System$Domain$User] AssignedToUser ON
    AssignedToUserRel.[TargetEntityId] = AssignedToUser.[BaseManagedEntityId]
    INNER JOIN [ServiceManager].[dbo].[Relationship] AffectedUserRel ON
    inc.[BaseManagedEntityId] = AffectedUserRel.[SourceEntityId]
    AND AffectedUserRel.[RelationshipTypeId] = 'DFF9BE66-38B0-B6D6-6144-A412A3EBD4CE'
    INNER JOIN [ServiceManager].[dbo].[MT_System$Domain$User] AffectedUser ON
    AffectedUserRel.[TargetEntityId] = AffectedUser.[BaseManagedEntityId]
    INNER JOIN MT_ClassExtension_685ca40e_4af9_4bca_93e1_5397c69cc946 incExt ON
    inc.BaseManagedEntityId = incExt.BaseManagedEntityId
    INNER JOIN DisplayStringView locdisp ON incExt.Locations_30F8DDC7_9552_A890_D1FC_6FC14F5B45AF = locdisp.LTStringId
    AND locdisp.LanguageCode='ENU'
    INNER JOIN EnumType enumClass ON 
    inc.Classification_00B528BF_FB8F_2ED4_2434_5DF2966EA5FA = enumClass.EnumTypeId
    INNER JOIN DisplayStringView classdisp ON enumClass.EnumTypeName = classdisp.ElementName
    AND classdisp.LanguageCode='ENU'
    where AssignedToUser.DisplayName='somename'
    ORDER BY locdisp.DisplayName, ID ASC
    This query is run against the ServiceManager database.
    (We extended the Incident class so that we could get detauls from users such as Location (56+ physical locations), Room Number, and Alternate Schedule (for users who are not full time at one location).
    This query works on my end and assuming the AssignedToUser and AffectedUser are not NULL properly display the list of incidents for a given technician (or all technicians) however there is one major flaw.  If a ticket gets assigned to Technician A and
    gets reassigned at some point to Technician B (or reassigned again to Technician C) there are duplicate records coming up for each AssignedTo user.  If you search for all technicians the duplicates show but if you filter by individual technicians then
    each tech has a version of the incident appear in their list.
    Does anyone out there know of a way to query for the latest 'version' of an incident so that only the most recent AssignedTo is listed.
    Note: Feel free to use this query as a building block for your own potential portal or use, although obviously if you figure it out please share!

    first off, welcome :) second..not bad for a beginner. The operational database is basically a no-man's land where dangerous monsters roam. And it's dark. ;)
    third: a warning..you shouldn't query the database directly. But..we all do it anyway. :)
    I recommend using "with (NOLOCK)" on _all_ tables, not just the incident table. The Operational Database is supposed to be hands off..even simple "select" queries can interfere with the data access service and the hundreds of queries
    that run automatically against this database. So, to be safe..always use "with (nolock)" on every table that you query.
    If you want unassigned incidents to show up, replace your inner joins with left outer joins. That's a SQL thing..you want to display all incidents whether they have related users or not. So, left outer join.
    The reason you're seeing multiple assigned-to users is because "deleted" relationships between objects aren't truly deleted for about 2 days. So, in your join criteria, simply add "AffectedUserRel.IsDeleted=0". This will filter out any
    "deleted" relationships from your result set. Obviously you'll have to add that filter for each relationship table instance in your query.
    Lastly: I strongly recommend you use the SDK instead of querying the database directly. There's a learning curve, but it's far safer and it's actually supported :)

  • Query regarding approval policies for custom Role

    Hi ,
    1.In OIM 11g R2 . I have created a Role named SecurityAdmin. Assigned it to a user named User1.
    Logged in as User1 and searched for another user say User2
    2.Modified its Profile and when clicked on save .Request was created and went to approval process.
    Similar thing happened when i tried to disable the user and assign roles to User2.(Note : I am logged in as User1 not xelsysadm)
    Created two auto approval policies for assign roles and Modify user profile
    Query : Do i have to create approval policy for each process like Disable User, Enable user , etc ?
    Is there any generalized way that i make a policy on high level that if Role is Security admin Request goes to Auto Approval.
    Please help.
    Thanks in advance.

    >
    Query : Do i have to create approval policy for each process like Disable User, Enable user , etc ?You have to create approval policy for each of these request types.
    Is there any generalized way that i make a policy on high level that if Role is Security admin Request goes to Auto Approval.
    Please help.In approval policies you can select Auto Approval checkbox and write a rule Requester.Role Name Equals Security admin

  • Query on DNS setup for Active Directory for a new data center

    I have third party DNS appliances providing DNS Service for Active Directory (Windows 2008 R2) and there are also secondary DNS servers, which are MS DNS server with a secondary zone configured, for redundancy. I have to setup a new data center
    and move servers/services to this data center. In this scenario, can I install a new Microsoft DNS server with a secondary zone and use this as the primary DNS Server for all the member servers at this new location ? I am aware that this new DNS server will
    not be able to make any updates to the secondary zone and for that purpose, is there anyway to redirect such requests to the DNS appliances in my current data center across the WAN ? I am trying to avoid purchasing a new DNS appliance for the new data center
    and want to know what are the alternatives I have.
     

    im not entirely sure by your setup, as normally you would use AD integrated zones for DNS in an AD environment - although there are other options as you have already setup.
    the fact the zone is a secondary zone in DNS server terms doesn't mean you can't point your clients to it as their primary dns server. They will quite happily resolve names using a secondary server.
    so as long as your dns devices are correctly setup to support the additional secondary zone I see no reason why you couldn't do this.
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    My Blog
    LinkedIn:

  • Workflow Notifications not sending for AdHoc Role

    Hi,
    I am trying to send my workflow to multiple dynamic users, using the call createAdHocRole.
    Here is my code (I currently am using 2 user names for testing. This will be eventually be a variable) :
    +-- create role --+
    apps.wf_directory.createAdHocRole(v_role_name   -- role name
    +, v_role_name -- role display name+
    +, null -- language+
    +, null -- territory+
    +, null -- role description+
    +, null -- notification preference+
    +, 'JEHANSEN,DCDRIGGS' -- role users+
    +, null -- email addresses+
    +, null -- fax+
    +, 'ACTIVE' -- status+
    +, trunc(sysdate) + C_PURGE);+
    When I run the workflow, it runs with no errors, but I am not receiving any emails. I can view the workflow in the Status Monitor and I see the Notification being created and it shows my new role as the performer. Both usernames that I am using for the Role Users are setup as Users and Employees in the environment.
    I've queried the WF_USER_ROLES_ASSIGNMENTS table and I see my new role there, and both usernames are in the table. Both users are also in WF_USERS with email addresses, and also in WF_LOCAL_USER_ROLES. When I query WF_NOTIFICATIONS, I see the notification being created there, with a status of OPEN, receipient_role being my new role, mail_Status is blank, responder is blank, original_recipient is my new role, from_user is the supplier, and to_user is my role name .
    Can anyone see what I am missing? I thought if I create the role with a null email_address it then sends email to all users in that role? It probably doesn't matter, but these are being submitted upon the change of a PO in iSupplier (Oracle Apps).
    Thanks,
    Janel

    Hi,
    Once you have created the role, they can be referenced in your Workflow process in the same way as an other role. For example, create an ad-hoc role "MYTEST123" using the standard WF_DIRECTORY API. Then you can use this as the notification recipient in your process.
    If you are creating the roles dynamically within a process, then once the role has been created, set an item attribute (e.g. attribute NTF_RECIPIENT) to the name of the new adhoc role, and then have the notification recipient set to the value of the item attribute.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Return Code - Query for Multiple Rows as XML

    Hi,
    I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
    { call MyStoredProc(?) }
    This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
    Thanks
    Nic

    Thanks for the offer, unfortunately we would need something certified by Adobe.
    Nic

  • How to enter a query into a role

    Hello Everyone,
    We are starting to look at the new analyzer.  We cannot find how to Enter a query in a role.  In the old analyzer there was a button called this.  Where is it in the new analyzer?  How to you enter and assign a query to a role?
    Thanks so much!

    Hi,
    We have a new concept of authorization where you are no more suppose to assign the query to the role from business explorer.
    I am not sure if you have gone through this but see this link a it explains about the new authorization concept that is analysys authorization.
    http://help.sap.com/saphelp_nw70/helpdata/EN/be/076f3b6c980c3be10000000a11402f/content.htm
    Now we have to create authorization object and use existing SAP autorization objects to assign authorizations...
    Also you use advanced search for searching new authorization concept in BI...this will give you plenty of links for it.
    Thanks
    Ajeet

  • Transaction for active article list -sitewise-urgent

    Transaction for active article list -sitewise plz

    Hello,
    You can get site-wise list of articles using transaction MM60. But this shows all the articles - active and blocked.
    In order to filter blocked articles, you may create an SQVI query between MARA and MARC tables. In the query, include MARA-MSTAE  and MARC-MMSTA in the selection screen. They should be set to blank while executing the query to get active articles.
    Thanks,
    Venu

Maybe you are looking for

  • How to change the ipad's name in iTunes

    When i connect ipad to PC, the iTunes gives it the name as " "My PC Account" 's ipad" automatically. For the reason of facility management, I need to change the ipad's name which appear at iTunes. How to fix it?

  • Should I save the Project Data in iMovie or iDVD??

    Hello, After creating an iMovie and an iDVD project, I'm interested in saving the digital info in case someday I want to edit it. WHat's the difference in saving an iMovie project vs. an iDVD project archive? Should i save both?

  • Internal flow of v3 update

    hi     i am suresh     in v3 update 4 types are there 1)serialized                                    2)direct delta                                    3)qued delta                                    4) un serialized      i want internal data flow de

  • Having problems editing a template I downloaded and changed in photoshop

    Hello, I recently downloaded a template. I added an image to the background in photoshop and saved it for the web. When I open the image folder the image I added to the background was there and everything looked good. When I opened the index file in

  • Inbuilt Function

    Hi Experts, I have a universe on SAP BW Bex Query, I have a Dimension "Tracking Number" Defined as [ZTRCK_NUM].[LEVEL01] in Select clause. I need to create a new Object in Universe Designer which gives count of "Tracking Number"; I am not sure how to