Query to get objects list for which the current user has 'SELECT' privilege

Hi,
I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views. The privilege information for the current user is scattered in more than one system views. I have following system views
USER_TAB_PRIVS_RECD - Object grants for which the current user is the grantee
ROLE_TAB_PRIVS - describes table privileges granted to roles. Information is provided only about roles to which the user has access.
If the object privilege is granted explicitly like "GRANT ALL ON TABLE_NAME TO "USERNAME" then this privilege entry goes to USER_TAB_PRIVIS_RECD
If the object privilege is granted by ROLE. Role is created with certain object privileges. this role is assigned to user "GRANT ROLE_NAME TO "USERNAME"", then this entry goes to ROLE_TAB_PRIVS
From these findings, I have composed below query
(SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT')
Have I got user's all prvilege details? should I look some other system views?
How to exclude system table privileges details?
(SELECT DISTINCT TABLE_NAME FROM USER_TAB_PRIVS_RECD) UNION (SELECT DISTINCT TABLE_NAME FROM ROLE_TAB_PRIVS WHERE PRIVILEGE = 'SELECT' AND OWNER NOT IN ('SYS','SYSTEM') Is this right?
What about Public role in Oracle? Should I consider public role here?
Oracel Version :11g
I want make this query to work on Oracle 8i or above version
Thanks

>
I want to get tables and views list for which the current user has 'SELECT' privilege excluding sytem tables and views.
>
You will need a hierarchical query to do that.
Try this script for Listing privileges recursively for Oracle users
http://www.adp-gmbh.ch/ora/misc/recursively_list_privilege.html

Similar Messages

  • The current user has insufficient permissions to perform this operation when trying to add Term stored managed navigation.

    Hi,
    i am getting this error "The current user has insufficient permissions to perform this operation." when trying to add the Term store managed navigation like the following screen shot. i am the Farm
    administrator and as well managed services account. also noticed, cannot delete the service application, saying you don't have enough permission to delete the db. but using this account i was able to do everything before in my environment. is anyone already
    face this kind of error, so what will be the way to resolve this?
    Appreciated!

    event though its a farm admin,It should provide the access to MMS.please find the below link for more details and the solution for the issue.
    Go to SharePoint Central Administration Site –> Application Management –> [Service Applications] –> Manage service applications
    2.   Highlight the Managed Metadata Service that your web application is associated with. (Do not click on the link, just click somewhere else on that row to highlight it)
    3.   Click on Permissions button in the ribbon area.
    4.   Add the application pool account used by your web application and give it  ‘full Access to Term Store’
    5.   Click OK.
    http://expertsharepoint.blogspot.de/2014/08/managed-metadata-service-or-connection.html
    Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/

  • Custom Search Results web part: show only sites wherein the current user has access

    Hi,
    I'm trying to create a custom Search Box and Search Results web part in one of my web application. The search result should show only sites wherein the current user only has an access. Do you have an idea how to implement this? Thanks. :)
    Regards,
    Napster

    Hi Napster,
    From my experience, we can only search the result which we have view permission at least.
    Please provide more information about your requirement if there is misunderstanding.
    More information about search result web part:
    http://technet.microsoft.com/en-in/library/gg549987(v=office.15).aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • I have a user who has permissions on site A B C 's some libraries. How can I get a list for all the contents the user have permission for?

    The user has permissions on site A B, and C. within the sites, the user has permissions on some lists/libraries.
    how can i retrieve an entire list to see what the user has permissions on?
    thank you 
    I might be a newbie in some area. But I'm working hard. :)

    You can get the report using powershell, please check below posts
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5a3252bf-cb03-4488-9a0d-f4e0ce07d497/user-permissionsaccess-report-in-sharepoint-site
    http://reality-tech.com/2011/12/30/reporting-on-all-user-permissions-in-a-web-application/
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How to read value of the period for which the sales volume has been entered

    Hi Experts,
    In the transaction "/ncrm_ipm_d_usage_data", we have a scenario where a user can enter value in the "sales volume reported" column for more than one period. Now we need to read the period_from (date from) for the first "sales volume reported" value entered.
    For example: If a user enters values in "sales volume reported" column for the period_from 02/01/2009, 05/01/2009 & 08/01/2009. We need to read the first period_from value for which sales volume value is entered. Which means it should be 02/01/2009.
    Our issue is that we are unable to find the standard method or variable which holds this value. We found these classes through debugging but it does not help us.
    1. Class CL_CRM_IPM_USAGE_DATA
    Methods we found:
    1. FIND_CONTRACT
    2. MAINTAIN_DATA
    3. MAP_UI_DATA
    4. FILL_CUMULATED_I
    5. GET_USAGE_DATA_KEY
    Please help us to find the standard method or variable which reads the period_from for the first sales volume entered.

    Hi Student5088,
    I used a Copy-Block to create a delay for a certain number of values (time) of a signal. With that you can continuously compare signal at T1 with Signal at T1*0.5.
    Greetings
    Walter
    Attachments:
    Compare.DAC ‏28 KB

  • Region Customization - can you extract the page regions a user has selected

    Is there an APEX view, or someway to determine programmatically, which customizable regions a user has selected?
    In the case where we have set regions to be 'Customizable and Shown By Default', our application needs to know which regions a user has selected or de-selected, as the application processing logic will vary depending on the user selection.

    Here are some useful queries.
    To see all the views available.
    select *
    from apex_dictionary
    where column_id = 0Then the other column_id values are the actual columns on those views.
    So I ran this:
    select *
    from apex_dictionary
    where column_name like 'CUST%'And found a good candidate on view APEX_APPLICATION_PAGE_REGIONS
    You're looking at something like this:
    select region_name, customization, customization_name
    from APEX_APPLICATION_PAGE_REGIONS
    where application_id = :APP_IDThanks
    -Jorge
    Please update your user name from user2543337 to something more friendly

  • Report for the List of Vendor for which no Purchase order has been created

    Hi ALL
    Please let me know if there is any Report for the List of Vendor for which no Purchase order has been created
    regards,

    Hi Prateksha Vaid ,
    Go to transaction S_ALR_87012093
    Select accounts with no purchases checkbox and execute
    Diwakar
    reward if useful

  • HT201272 My laptop pc got stolen, how can I get hold of all the itune music I purchased, or at least get a list for insurance?

    My laptop pc got stolen, how can I get hold of all the itune music I purchased, or at least get a list for insurance?

    Yu can try this program.  If unsuccessful, the contents of the iPod will be deleted if yu update/restore with the iPod in recovery mode.
    RecBoot: Easy Way to Put iPhone into Recovery Mode | Jaxov

  • I have an ExportPDF subscription under an old account for which the email does not exist anymore and I have forgotten the password.  Therefore I cannot reset the password.  I hav created a new Adobe account so how do I get the subscription for ExportPDF m

    I have an ExportPDF subscription under an old account for which the email does not exist anymore and I have forgotten the password.  Therefore I cannot reset the password.  I have created a new Adobe account so how do I get the subscription for ExportPDF moved to the new account?

    Hi lgmmo,
    I think your best best to get this resolved is to contact Adobe Customer Care. Here's the contact info: Contact Customer Care.
    A quick Chat session should get you fixed up.
    Please let us know if you have additional questions.
    Best,
    Sara

  • How do you get a list of all the trigger DDLs?

    I want to get a list of all the DB trigger DDLs of owner 'ABS'. I want to do it using 1 SQL statement.
    This is what I ran:
    SELECT
    TO_CHAR(DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS'))
    FROM
    ALL_TRIGGERS
    WHERE
    OWNER = 'ABS';
    I get this error: [1]:
    (Error): ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 4414, maximum: 4000)
    Then I looked up in the web and they ask to use DBMS_LOB.SUBSTR instead. So I do that:
    SELECT
    DBMS_LOB.SUBSTR(DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS'), 32767, 1)
    FROM
    ALL_TRIGGERS
    WHERE
    OWNER = 'ABS';
    Now I get this error:
    [1]: (Error): ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1
    Looks like you cannot show more than *4000* chars. There are 43 triggers whose DDL is more than 4000 chars long.
    Why is this?
    How can I solve my problem?
    Edited by: Channa on Feb 16, 2010 9:45 PM

    Herald, fantastic news. SET LONG did the trick.
    But I had to put a very big value. 32000 was not enough. Otherwise some of the triggers (big ones) got cut off.
    This is my complete code which did it.
    SPOOL F:\Channa\zz_zzTemp\Binuka\OutPut.txt
    set trimspool on
    set pages 0
    set long *1000000000*
    set linesize 32767
    SET TERMOUT OFF
    SELECT DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS')
    FROM ALL_TRIGGERS
    WHERE OWNER = 'ABS' AND trigger_name NOT LIKE 'BIN$%'
    SPOOL OUT
    THANKS A LOT. REALLY APPRECIATE IT.
    P.S: I had to include the NOT LIKE 'BIN$%' in the where clause because otherwise I got this error:
    ERROR:
    ORA-31603: object *"BIN$cqXDSqghrFngQKjAJAovgw==$0"* of type TRIGGER not found in
    schema "ABS"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 2805
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    no rows selected
    I THINK BIN$... triggers are dropped triggers in the DB recycle bin???
    Edited by: Channa on Feb 17, 2010 2:58 AM
    Edited by: Channa on Feb 17, 2010 3:01 AM

  • SQL query to get a list of relations between workitems

    How can I create a SQL query to get a list of all problems with related changes?  And all problems with related incidents?
    I have tried to join the tables RelationshipTypeDim with ProblemDimKey and ChangeRequestDim, but the results are not correct.

    The relationships in the data warehouse can be kind of tricky. The relationships are contained in the WorkItemRelatesToWorkItemFactvw table. This table lists the related items by their WorkItemDimKey, so you cannot reference directly from the ChangeRequestDimvw
    or ProblemDimvw. You will need to reference the WorkItemDimvw to get the WorkItemDimKey for each entry.
    The query below will get all of the related work items from the Change Request class. The way the joins work is ChangeRequestDimvw gets the list of change requests. Then inner joins WorkItemDimvw to get the WorkItemDimKey for each CR. Then inner joins WorkItemRelatesToWorkItemFactvw
    to get all of the CRs with related work items. Then inner joins the WorkItemDimvw again to get the ID of the related work item. 
    Now the tricky part is it appears that these relationship are set based on which item  that created the relationship. So you need to union a second query that reverse the relationship on the WorkItemRelatesToWorkItemFactvw. 
    This query should give you a good start on getting the related work items. You can filter it down from here if you only want to include problems.
    SELECT C.ID, WIWI.ID
    FROM dbo.ChangeRequestDimvw C
    INNER JOIN dbo.WorkItemDimvw WI ON
    WI.EntityDimKey = C.EntityDimKey
    INNER JOIN dbo.WorkItemRelatesToWorkItemFactvw AS WIRWI ON
    WIRWI.WorkItemDimKey = WI.WorkItemDimKey
    INNER JOIN dbo.WorkItemDimvw AS WIWI ON
    WIWI.WorkItemDimKey = WIRWI.WorkItemRelatesToWorkItem_WorkItemDimKey
    union
    SELECT C.ID, WIWI.ID
    FROM dbo.ChangeRequestDimvw C
    INNER JOIN dbo.WorkItemDimvw WI ON
    WI.EntityDimKey = C.EntityDimKey
    INNER JOIN dbo.WorkItemRelatesToWorkItemFactvw AS WIRWI ON
    WIRWI.WorkItemRelatesToWorkItem_WorkItemDimKey = WI.WorkItemDimKey
    INNER JOIN dbo.WorkItemDimvw AS WIWI ON
    WIWI.WorkItemDimKey = WIRWI.WorkItemDimKey
    Order by C.ID
    Matthew Dowst |
    Blog | Twitter

  • How to get pages list for a group space or create a page for a group space

    hi All,
    I am using wc11.1.1.3, I want to use java api to implementing the following functions in site template:
    1. Get pages list for a given group space
    2. Create a page for a given group space
    I researched the following codes from web site:
    PageDef newPage = mPageService.createPage(
    PERSONAL_USER_PAGE, pageNameFormat, pageTitle,
    "MyPageTemplate1.jspx",
    "/mytemplates/",
    null, null, null);
    What should be used instead of PERSONAL_USER_PAGE if a group space page is intended to be created? which parameter is for defining group space name that the page should be created for?
    By the way, PageService seems has method for getting list of pages, but how to use it to get page list which is in a specified gs?
    Best regards

    did you manage to get the page list using Page Service API?

  • FindGroups - Error while getting group list for login user

    Hi All,
    I am using below code snippet to search a group in OIM but it gives me "Error while getting group list for login user" error message.
    tcResultSet rsetAss = null;
    tcGroupOperationsIntf groupIntf = (tcGroupOperationsIntf)utilFactory.getUtility("Thor.API.Operations.tcGroupOperationsIntf");
    HashMap mapGrp = new HashMap();
    mapGrp.put("Groups.Group Name","DEF_GROUP");
    rsetAss = groupIntf.findGroups(mapGrp);     
    And i am ruuning this code using xelsysadm logon.
    com.thortech.xl.util.config.ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    com.thortech.xl.crypto.tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);     
    Any guess?
    Thanks & Regards
    Inbaa.

    Here it is Rajiv,
    public class GetUserApprover {
    private String defGroup = "DEF_GROUP";
    public tcUtilityFactory getUtilFactory()
    tcUtilityFactory utilFactory = null;
    try
         logger.debug("Initializing the utilFactory");
         com.thortech.xl.util.config.ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    com.thortech.xl.crypto.tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);
    catch(Exception ex)
         logger.info("Error while getting the utilFactory" + ex.getMessage());
         System.out.println(ex.getMessage());
    return utilFactory;
    public String getGroupKey(String defGroup){
              String groupKey = null;
              tcUtilityFactory utilFactory = getUtilFactory();
              if(utilFactory != null)
         System.out.println("utilFactory not null. Searching for group:" +defGroup );
                   try
              tcResultSet rsetAss = null;
              tcGroupOperationsIntf groupIntf = (tcGroupOperationsIntf)utilFactory.getUtility("Thor.API.Operations.tcGroupOperationsIntf");
              HashMap mapGrp = new HashMap();
              mapGrp.put("Groups.Group Name","DEF_OWNER_GROUP");
              System.out.println("Finding Group....");
              rsetAss = groupIntf.findGroups(mapGrp);          
              System.out.println("RowCount-->" +rsetAss.getRowCount() );
              rsetAss.goToRow(0);
              groupKey = rsetAss.getStringValue("Groups.Key");
         System.out.println("GroupKey-->" + groupKey);
         catch(Exception e){
              System.out.println("Error" + e.getMessage());
              return (java.lang.Object)groupKey;
    }

  • I want standard report to get material MATNR for Which PO isn't created

    hi
    i want standard report to get material no for which Purchase Order is not created.
    only those Material no for Which PO is not generated.
    thanks.

    Hi,
    go to me23n transaction and in the top extreme left click the
    Purchase order  tab it will show you a drop down list where you will have a option called other purch. order click this and enter the purchase order for which you want to know the exsistence of that purchase order.
    if Purchase order is present it will show the order otherwise it will through you an error message.
    hope this helps.

  • Connect-SPOService : The Application ID (AppID) for which the service ticket is requested does not exist on the system.

    I am trying to connect to SharePoint in my Office 365 environment by following https://support.office.com/article/Set-up-the-SharePoint-Online-Management-Shell-environment-7b931221-63e2-45cc-9ebc-30e042f17e2c and I am getting:
    Connect-SPOService : The Application ID (AppID) for which the service ticket is requested does not exist on the system.
    Is there some setting I need to change on the O365 side? Thanks.

    Hi,
    Based on your description, my understanding is that you want connect SharePoint Online using PowerShell.
    Please make sure that the following software is installed.
    Windows Management Framework 3.0
    SharePoint Online Management Shell
    And then, open the SharePoint Online Management Shell and use the Script below to test
    whether it works.
    $User = "[username]@[tenant].onmicrosoft.com"
    $Pass = "[password]"
    $creds = New-Object System.Management.Automation.PSCredential($User,(ConvertTo-SecureString $Pass -AsPlainText -Force));
    Connect-SPOService -Url https://[tenant]-admin.sharepoint.com -Credential $creds
    Get-SPOSite
    More information:
    http://blog.falchionconsulting.com/index.php/2013/01/using-powershell-to-manage-sharepoint-2013-online/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

Maybe you are looking for