Grant SELECT on all APPS objects to Custom schema

Hi All,
My requirement is to GRANT SELECT privileges on all Objects from APPS schema to a custom schema say XXTEST.
I am OK, if there are multiple privileges to be granted (i.e. separate ones for TABLES,SYNONYMS,PACKAGES).
I basically want to refer all APPS objects from XXTEST, without any schema prefix.
I read about GRANT SELECT ANY TABLE, and it looks like I can access any schema objects from it.
But I would like to know if I can grant from a particular schema alone.
Thanks.

Kavipriya wrote:
I came across a privilege like 'SELECT ANY DICTIONARY', from which I can access all dictionary related tables without schema prefix. So am looking for something similar for APPS objects.Problem is, something similar for APPS objects does not exist. It's simply not there. You need to grant 'ANY' privileges, which means you'll be allowing the user to all the tables in the database, which is almost certainly not what you want, or you need to do individual grants.
As I mentioned before, you can write SQL that will generate the GRANT statements for you, so you don't need to do it yourself.
For example:
select 'grant select on '||owner.table_name||'to some_user;' from dba_tables where owner='APPS';And then execute the output of that query, which will be a bunch of GRANT statements.
Hope that helps,
-Mark

Similar Messages

  • Grant select on all table of a schema to role

    Hi , is it possible to grant select on all table on a schema to a role?

    To grant SELECT on all tables of the current schema to particular role or user:
    SELECT 'GRANT SELECT ON '||TABLE_NAME||' TO READ_ONLY_ROLE;' COMMAND
    FROM (
    SELECT TABLE_NAME
    FROM ALL_TABLES
    WHERE OWNER = (SELECT USER FROM DUAL)
    Then copy and execute the result commands, eg:
    GRANT SELECT ON DEPT TO READ_ONLY_ROLE;
    GRANT SELECT ON EMP TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_USERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_CUSTOMERS TO READ_ONLY_ROLE;
    GRANT SELECT ON DEMO_ORDERS TO READ_ONLY_ROLE;

  • GRANT SELECT ON ALL TABLES

    Is there a direct SQL to grant select on all tables in the schema for a user? Or do we need to write a PLSQL for this?
    Also, if a new table T1 is created or existing table T2 is dropped and recreated after granting the select all privilege, will the user have access to T1 and T2?
    thanks

    Is there a direct SQL to grant select on all tables
    in the schema for a user? Or do we need to write a
    PLSQL for this?There is no privilege that would give user A access to all the tables in schema B. You would need to grant access to each object, which can certainly be done via dynamic SQL in PL/SQL.
    There is a privilege SELECT ANY TABLE which allows the user to query any table in the system, but this is generally very dangerous and probably not something you would want to give a normal user.
    Also, if a new table T1 is created or existing table
    T2 is dropped and recreated after granting the select
    all privilege, will the user have access to T1 and
    T2?Unless you grant SELECT ANY TABLE, you would need to explicitly grant A access to any new tables created in schema B (or to tables after they are dropped and re-created). Potentially, you could create a DDL trigger that submitted a job that would, in turn, make the grant whenever a new table was created in schema B.
    Justin

  • How to GRANT SELECT on all the tables in 1 go?

    Hi
    I have many tables (close to 200) in my Schema. I want to grant SELECT ON ALL TABLES to another user. How do I achieve this in one go?
    Thanking you in advance,
    ...

    Although Justin has given a wonderful answer. You might also review the following threads;
    Grant select on a schema
    Re: Grant select on a schema
    grant select on
    grant select  on
    grant select on tables
    Re: grant select on tables
    Adith

  • Grant select on all of  views to public

    How to grant select on all of views to public? Thanks in advance.

    782150 wrote:
    How to grant select on all of views to public? Thanks in advance.
    spool doit.sql
    select 'grant select on '||
              owner ||
             '.' ||
             view_name ||
            ' to public;'
    from dba_views;
    spool offexecute doit.sql
    That's how it's done. Whether or not it's wise is a different question.

  • Grant select on all tables of a schema

    I need to grant select on all tables (over 200 tables) of a schema to other users. Are there any SQL syntax to do this?
    Thanks!

    Execute the following script, modify it for your environment:
    Script
    Accept from_owner char prompt 'Grant from user:'
    Accept to_user char prompt 'grant to user:'
    set head off;
    set lines 300;
    set pages 0;
    set termout off;
    set feedback off;
    set head off;
    set verify off;
    spool d:\temp\grant.sql
    select 'grant select on &from_owner..'||
      table_name||
      ' to &to_user;'
      from dba_tables
      where owner=upper('&&from_owner');
    spool off;
    set head on;
    set pages 24;
    set termout on;
    set feedback on;
    set head on;
    @d:\temp\grant.sqlExecution example:
    system@DBA> @d:\temp\grants.sql
    Grant from user:scott
    grant to user:ejemplo
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.
    Grant succeeded.

  • How to grant privileges on all the tables in a schema

    Hi All,
    Can you tell me how to grant privileges on all the tables of a schema A
    to schema B.
    For Example:
    There are 200 tables in schema A, I wanted to grant select privilege on all the tables of a scheme A to schema B.
    Thanks in advance.

    note that USER is the user that will have the select priviledge
    the procedure includes views as well
    CREATE OR REPLACE PROCEDURE GRANT_ACCESS_ON_USER IS
    CURSOR c1 is select table_name from user_tables;
    CURSOR c2 is select view_name from user_views;
    tablename user_tables.TABLE_NAME%TYPE;
    viewname user_views.VIEW_NAME%TYPE;
    BEGIN
    tmpVar := 0;
    OPEN c1;
    loop
         fetch c1 into tablename;
         EXIT WHEN c1%NOTFOUND;
         EXECUTE IMMEDIATE 'GRANT SELECT on '||tablename ||' to USER';
    end loop ;
    close c1;
    OPEN c2;
    loop
         fetch c2 into viewname;
         EXIT WHEN c2%NOTFOUND;
         EXECUTE IMMEDIATE 'GRANT SELECT on '||viewname ||' to USER';
    end loop ;
    close c2;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END;
    /

  • How can i access all the objects of one schema from another schema

    Dear All,
    How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
    Thanks in advance,
    Mahi

    First of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
    As long as you have proper privilege on target object. You can access it with or without synonyms.
    Assuming you have proper privilege of objects, you can use following command to assume schema owner.
    ALTER SESSION SET CURRENT_SCHEMA = Schema_owner

  • Granting select on all objects of apps in R12

    Hi All,
    How can I achieve like user xxx having read only access to apps user objects in EBS R12.
    Best Regards,

    Pls check this thread
    READ-ONLY APPS Schema in EBS.
    and you can also check this
    http://souravpupu.blogspot.com/2011/09/how-to-create-apps-read-only-user.html
    thanks

  • Script to Grant Role for All User Objects.

    Hi DBAs,
    I have created a select_only role. I need a script to populate that role with all user_objects belonging to one person and eventually grant that role to another person. Perhaps a dynamic sql.
    Please help.
    Thanks
    -Samar-

    Samar,
    Please see if the following documents help.
    Note: 18080.1 - Script to Create Roles
    Note: 174138.1 - How to Tranfer all Roles and Grants to Another Database
    Note: 729428.1 - Script to create roles & apply grants from database A to B
    Regards,
    Hussein

  • Oracle Apps EUL with Custom Discoverer Views

    Disco Environment:
    OracleBI Discoverer 10g (10.1.2.2)
    Oracle Business Intelligence Discoverer Plus 10g (10.1.2.54.25)
    Discoverer Model - 10.1.2.54.25
    Discoverer Server - 10.1.2.54.25
    End User Layer - 5.1.1.0.0.0
    End User Layer Library - 10.1.2.54.25
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    Oracle Applications R12 EUL
    All,
    Up until now, we have been placing our Discoverer custom views in our apps schema. From a "keeping track" perspective and from a "keep Disco views separate from apps" perspective, we are inclined to create a custom schema to place all of our custom Discoverer views. I have heard that Noetix does this as well.
    To accomplish this, we were planning to provide a grant select to all tables, views and synonyms (with a limited execute rights to some packages).
    The easiest thing to do is to keep on doing what we are presently doing. We have a naming schema in place that enables us to quickly identify all custom Disco views.
    Can I have people whom have implemented a custom schema for their Disco views in apps let me know how this has worked for them? This type of Disco environment appears to require a lot of communication between the Disco staff and the DBA to make sure these grants are set-up correctly.
    Thanks,
    Patrick

    Hi,
    All the eBS sites I have worked on have created the majority of their custom views in the APPS schema using a naming convention to separate them from the seeded views. The reason being is that the SQL in the view (including all the function calls) is run with the privileges of the owner of the view. If the view is defined in another schema, then this schema must have access to the APPS database objects which can be a lot of work to set up because it is very hard to identify the dependencies and unnecessarily opens up the security on the APPS schema.
    Where the data is held in custom tables and there are views on these custom tables, then both the tables and the views are held in a separate schema.
    Rod West

  • Grant system views to app user

    Hi all,
    11.2.0.1
    Tha batch process at night encounters lock problem hence their report generations affected and delayed.
    I give the operators this command, so that they will kill or stop the process holding the lock:
    SELECT TO_CHAR(sysdate,'DD-MON-YYYY HH24:MI:SS')||' User '||s1.username||'@'|| s1.machine||' ( SID= '|| s1.sid||
            ' ) with the statement: '||sqlt2.sql_text||' is blocking the SQL statement on '||s2.username||'@'||s2.machine||
            ' ( SID='||s2.sid||' ) blocked SQL -> '||sqlt1.sql_text AS blocking_status
       FROM Gv$lock l1,Gv$session s1,Gv$lock l2,Gv$session s2,Gv$sql sqlt1,Gv$sql sqlt2
      WHERE s1.sid =l1.sid
        AND s2.sid =l2.sid
        AND sqlt1.sql_id= s2.sql_id
        AND sqlt2.sql_id= s1.prev_sql_id
        AND l1.BLOCK =1
        AND l2.request > 0
        AND l1.id1 = l2.id1
        AND l2.id2 = l2.id2;
    But this needs system views and can not run to the app user id.
    In connection to the ruling of security audit or without breaching it , do I need to grant select to all the system views being accessed by this script to the app user, then create synonyms to it 1 by 1?
    Or is there a one time grant for all system views? So I do not need to type one  by one plus creating the synonyms so that I may not miss any?
    Thanks,
    petra k.

    f55237a7-2c38-4db3-a7a3-1d77256f0730 wrote:
    Hi all,
    11.2.0.1
    Tha batch process at night encounters lock problem hence their report generations halted.
    I give the operators this command, so that they will kill or stop the process holding the lock:
    SELECT TO_CHAR(sysdate,'DD-MON-YYYY HH24:MI:SS')||' User '||s1.username||'@'|| s1.machine||' ( SID= '|| s1.sid||
            ' ) with the statement: '||sqlt2.sql_text||' is blocking the SQL statement on '||s2.username||'@'||s2.machine||
            ' ( SID='||s2.sid||' ) blocked SQL -> '||sqlt1.sql_text AS blocking_status
       FROM Gv$lock l1,Gv$session s1,Gv$lock l2,Gv$session s2,Gv$sql sqlt1,Gv$sql sqlt2
      WHERE s1.sid =l1.sid
        AND s2.sid =l2.sid
        AND sqlt1.sql_id= s2.sql_id
        AND sqlt2.sql_id= s1.prev_sql_id
        AND l1.BLOCK =1
        AND l2.request > 0
        AND l1.id1 = l2.id1
        AND l2.id2 = l2.id2;
    But this needs system views and can not run to the app user id.
    In view of the security audit or without breaching it , do I need to grant select to all the system views being accessed by this script to the app user, then create synoyms to it 1 by 1?
    Or is there a one time grant for all system views? So I do not need to type one  by one so that I may not miss any?
    Thanks,
    petra k.
    while posted approach will eventually work, it is like making three left turns around the block;
    instead of making a single right term.
    Place the desired SQL into a procedure (FIND_LOCKER) owned by highly privileged schema; then do as below
    GRANT EXECUTE ON FIND_LOCKER TO OPERATOR_USER;

  • What happened to Update All Apps???

    I can no longer select UPDATE ALL apps on my iPhone. For some insane reason, if I have 4 updates, I have to go to the App store, select an app, click on Free, click on install, then watch it start loading the program, then go BACK to the app store, and repeat the process for every app?
    And I no longer get update notifications or options in iTunes? Is this for real??

    Yes, now none of my applications will open. The application attempts to open, the goes back to the desktop screen. I had this happen once before, but when I "updated all" it fixed the problem. Now non of my applications work!!
    I have attempted deleting all applications and reloading them, but no dice. I says I have already loaded installed the applications. I reinstall, but it still does not work.
    Anyone have a solution for this?

  • Running Oracle seeded API from Custom Schema

    Hi All
    I have a custom schema and I need to call a Oracle standard API from this schema. When I try to initialize the session using fnd_global.apps_initialize I get the following error:
    ORA-00942: table or view does not exist
    ORA-06512: at "APPS.FND_CORE_LOG", line 25
    ORA-06512: at "APPS.FND_GLOBAL", line 104
    ORA-06512: at "APPS.FND_GLOBAL", line 1620
    ORA-06512: at "APPS.FND_GLOBAL", line 2170
    ORA-06512: at "APPS.FND_GLOBAL", line 2312
    ORA-06512: at "APPS.FND_GLOBAL", line 2250
    ORA-06512: at line 2
    I understand that this is an issue with GRANTS. However I have granted the EXECUTE ANY PROCEDURE and SELECT on all the underlying tables of this oracle package.
    Has anybody faced a similar situation. Any help would be greatly appreciated.
    Thank You.
    Jyoti
    Edited by: user646763 on Oct 3, 2010 11:49 PM
    Edited by: user646763 on Oct 3, 2010 11:51 PM

    Hi,
    I understand that this is an issue with GRANTS. However I have granted the EXECUTE ANY PROCEDURE and SELECT on all the underlying tables of this oracle package.The error "ORA-00942: table or view does not exist" indicates that the custom schema owner cannot select from the underlying tables. Please review the packages code again and make sure that your custom user has select privileges (or check if any public synonym needs to be created).
    See eTRM website for details about those packages and the relevant tables -- http://etrm.oracle.com
    Thanks,
    Hussein

  • Help in writing  query few schema objects  from another schema.

    Hi Gurus,
    Could some one help in writing an sql which will give list of all the object of a schema "genp" visible in another schema "genp_v" and "gen_con" there is an dblink and few grants on those schemas .
    i dont have the password of any of those users i have connected as sys and i can not change the password of any of those users..
    Any help on this is highly apprciated.
    Thanks in advance .

    could you please update me for all the objects apart from just the tables .
    thank you so much .. it was just out of my head at that moment .
    cheers

Maybe you are looking for

  • 2 problems the FIRST DAY of the purchase!!!! Seems to be the worst choice.

    After several months of deciding whether to go against my parent's advice, I purchased the macbook. I took it home and right away found a problem. The black plastic or whatever material it is pushes/pops in when it is supposed to be sturdy. There is

  • Twin 23" monitors or 1 24'?

    I can buy twin 23" ips panel monitors for about $100 more than one 24" ips. Given your preference which would you chose to work with? The 24' is the HP ZR24w The 23" is the NEC EA 231WMi or maybe the Dell U2311H Any advantages to having two monitors

  • Installation of PIP 3.1 for Primavera and OEBS

    Hi All, Where can I find the installation document for PIP:Project Portfolio Management Integration Pack for Primavera P6 and OEBS 3.1 either EBS 11.5.10 patch or EBS 12.1.2 patch. I dont find it in Edelivery and I find only the implementation guide

  • COEP table query taking longer time

    Hi ABAP guru's, I have a problem with the performance of a Select query on table COEP(91 million records in QA), i want to tune the program for better performance. Presenlty it took nearly 6 hrs to execute the program in Background, if in foreground

  • Do I have to deploy password in a bc4j application?

    I've modified my defined database connection to disable the deploy password option, but the bc4j.xcfg file for my business components project using that connection still shows the password. I've tried editing the file in the XML editor, but the lines