Grant privilges ON schema

Hi,
We hava created user user01, could you please advise how to grant create table and select privileges to that user on another schema.
Thanks

you can either grant select on each table from other user to user01 or you can grant select any table.
for example, assume other user owns three tables, table_a, table_b, table_c.
login as other user;
grant select on table_a to user01;
grant select on table_b to user01;
grant select on table_c to user01;
-- or, grant select any table, but other user has to have the appropriate admin privileges to do this
grant select any table to user01;This is a starter note on the topic:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28301/admqs_administer_users.htm#ADMQS12040

Similar Messages

  • GRANT EXECUTE ON SCHEMA.PACKAGE.PROCEDURE TO USER

    Hi,
    GRANT EXECUTE ON SCHEMA.PACKAGE.PROCEDURE TO USER
    returns:
    ORA-00905, do you know why? Can I grant privileges on procedure inside package?
    thanks

    As per my knowledge of oracle, we cannot grant privileges on procedure inside a package.
    <br><br>
    Raj<br>
    <b>www.oraclebrains.com<a>
    <br><font color="#FF0000">POWERED by the people, to the people and for the people WHERE ORACLE IS PASSION.</font></b>
    <br>
    Sorry Leonardo Horikian & Kamal Kishore, I was late and didn't know that you guys have already posted the answer.
    Message was edited by:
    rajs

  • Grant access to schema

    Can some give me a script to do the following:
    I have a schema name ABC and I want to give a user XYZ read access to all objects in the ABC schema. ie (TABLES, VIEWS. SWQUENCES etc)

    Hi,
    user8822168 wrote:
    Can anyone share some light on this
    select 'grant select on '
         || owner
         || '."'
         || object_name
         || '" to ABC'
    from      ALL_objects
    where      object_type in ('TABLE','VIEW','SEQUENCE')
    AND      owner IN ('XYZ', 'PQR')
    I run the above sql and it exeute without error and it shows that the grant was given to "ABC", but when I login as ABC I cannot see any of the objects that belongs to XYZ or PQR.
    I did use XYZ.object_nameThat looks like the correct way to build a GRANT statement.
    Post the complete procedure, including the EXECUTE IMMEDIATE statement that runs the statement built by the query above.
    Please don't post unformatted code. Type these 6 characters:
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
    Do I need some special previlege to grant select access to ALL ('TABLE','VIEW','SEQUENCE') at once As far as I can tell, you're not granting privileges on all objects at once; you're granting privileges on one object at a time (if at all; I haven't seen your EXECUTE IMMEDIATE statement).  There may only be a couple of milliseconds between the GRANT statements, but each one is for only one object.
    I even try to use one owner at a time by login as the schema owner but it did not work.Before XYZ can grant privileges on PQR's objects, PQR must grant the same privileges to XYZ WITH GRANT OPTION.
    I suggest you not try to do this; instead, have XYZ run the procedure just to grant privileges on XYZ's objects, and have PQR run it to grant privileges on PQR's objects.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Viewing Object-Level Permissions that are Granted in a Schema

    I have a user A and user B in my database. User B has around 1000 objects that constist of tables, views triggers, procs, packages, etc. We need to verify that user A was not explicity granted any write permissions on objects in user B's schema. What query and tables would give me insight into the object-level permissions that would have been granted on user B's objects?
    Thank you in advance!

    user11340104 wrote:
    I have a user A and user B in my database. User B has around 1000 objects that constist of tables, views triggers, procs, packages, etc. We need to verify that user A was not explicity granted any write permissions on objects in user B's schema. What query and tables would give me insight into the object-level permissions that would have been granted on user B's objects?
    Thank you in advance!appropriate code is available at URL below
    http://www.petefinnigan.com/tools.htm

  • Tables and grants in custome schema

    Hi
    I have a created the following script which will be running from Apps. The script includes about 7 tables definitions to be created in Cust schema. How can I include the grant within the script. (grant all to cust.test).
    We need to log into cust schema to issue grant on Apps. But my problem is the script itself will be running from Apps.
    {create table cust.test
    (person_id number,
    name varchar2(20));
    create synonym test for cust.test;
    Thanks in advance
    Regards
    anna

    By default the APPS user wil have access.
    Enter user-name: apps@crmdev
    Enter password:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.8.0 - Production
    SQL> create table fgbcrm.test_grant(c1 number);
    Table created.
    SQL> insert into fgbcrm.test_grant values(1);
    1 row created.
    SQL> delete from fgbcrm.test_grant;
    1 row deleted.
    SQL> drop table fgbcrm.test_grant;
    Table dropped.

  • Grants for physical schema and data-servers

    Hi,
    I'd like to know
    What are the Grants needed for the Owners of each physical schema?
    For example: Grants DDL (drop table n) and DML (select / update / delete / insert).
    Grants needed for the users' connection data-servers?
    Bovolini

    It depends on what technology you plan to use.
    If you plan to use Oracle - Is the data server connection user different from the owner of the physical schemas ?
    In addition to the connect, resource to each of these users, you will also need to give data server connection user privileges on the objects of the owner of the physical schemas.

  • Grant permission to Schema

    Hi,
    One of my team member has created a schema "CUSTOMER".  I have access to SYSTEM user and unable to see that schema "CUSTOMER" under catalog objects.  I am unable to grant access to other schema members using SYSTEM user or my own user because the schema is originally created by other team member.
    I get an error "Could not grant privilege 'SELECT' on 'CUSTOMER'. You are not authorized to perform the required actions"
    Can someone tell me how to grant access.
    Regards.
    Anjan

    Hi Anjan,
    Granting the access to a schema to other users is possible only from the dbuser using which the schema was created.
    In your case, you should login to the system with the user which created the schema "CUSTOMER" and from that user you should be able to grant access to "CUSTOMER" schema to SYSTEM user and your USER.
    Regards,
    Rashmi

  • Granting privilages  to schema for multiple tables at once...any script???

    Hello gurus,
    I have about 25 tables in ABC schema
    I want to grant all privialges to XYZ schema for all the 25 tables which is in ABC schema.... So is there is SQL statement or script i can run to grant privilages to all the tables.
    Something similar to these....
      SELECT 'create synonym ' || table_name || ' for ' || table_name
      FROM user_tables  {code}
    So i get all the table names ....then i can run as a script.... U r help is greatly appriciated gurus!!!
    Thank you!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Connected as administrator:
    set head off
    set pages 0
    set feed off
    spool myscript.sql
    Select 'grant select, insert, update, delete on abc.'||table_name||' to xyz;'
      from dba_tables
    where owner = 'ABC';
    Select 'create synonym xyz.'||table_name||' for abc.'||table_name||';'
      from dba_tables
    where owner = 'ABC';
    spool off;Obviously this doesn't manage any new table that will be created in the future on schema ABC...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • Grants for complete schemas

    How can I give all rights of one user to another without declaring each object privilege one by one? For my application I would like to devide the data to maintain into four different schemas to. Never the less I would like to connect to the db by one account and have full access to all of the four schemas. My client denies to give the connect user DBA rights. The connection user is not allowed to have "ANY" grants, either. But my application often creates tables, views etc. and drops it when they aren't usefull any more. So it is nearly impossible to manage the grants on each db object one by one. So, how can I give a user all rights for a bunch of others?

    To bring it to an end: the application I'm talking about is about ten years old. It started with MSAccess, was ported to Oracle about 9 years ago when nobody in our firm had detailed knowledge about RDBMS in practice. Until now the most installations are running with own instances with DBA rights for the connection user. That wasn't a big problem because most of our clients are offices where no other Oracle applications are running. All functionality to maintain the db (e.g. creating new firms (= new users) in new tablespaces, craete necessary PL/SQL functions, adapt data structures from version to version etc.) is integrated in our application. But new interested parties are bigger. And we have to integrate more canny. We are working on a new version that will take this more into view. But that will need about at least one more year of development. So it would have been nice to be able to reduce the pressure... And maybe we can by using Global Temporary Tables and resigning some features.
    But one thing is left: I agree strict data ownership is a good thing for a lot of businesses but a there is a lack of possibilities to structure data logical. From our view it is a benefit of the old approach for example to be able to export/import logical units...

  • Grant execute on schema.pakage.procedure.........

    i need to grant execute permission to a user on a procedure that is part of a package, i give this command which return error. What should i do
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP.ALTER_TEMP_INSURED_PERSON_DATA to cb_softdata;
    [Error] Execution (3: 53): ORA-00905: missing keyword

    malhi wrote:
    i need to grant execute permission to a user on a procedure that is part of a package, i give this command which return error. What should i do
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP.ALTER_TEMP_INSURED_PERSON_DATA to cb_softdata;
    [Error] Execution (3: 53): ORA-00905: missing keyword
    Hi
    Its not possible to grant at procedure level which exists inside a package.
    Try
    grant execute on  CORE_BUSINESS.PKG_CORE_BUSINESS_IP to  cb_softdata;Regards,
    Achyut
    Edited by: Achyut K on May 9, 2011 3:09 AM
    Nanu Kannadiga
    Edited by: Achyut K on May 9, 2011 3:17 AM

  • Grant Privileges on schema objects

    Hello all,
    I need to grant all privs to one user on another user all objects.
    I am not findign exact command to do so.
    eg: x have y objects.
    user z should be able to select,update, delete all x.y objects.
    Any help/insight is highly appreciated. !

    You have to grant the privileges on an object by object basis.
    You can use a bit of dynamic SQL to automate the process (note that I'm only showing the process of granting privileges on tables-- you can write similar bits of code to grant privileges on views and other types of objects as well).
    BEGIN
      FOR i IN (SELECT * FROM dba_tables where owner = 'X')
      LOOP
        EXECUTE IMMEDIATE 'grant select, update, delete on x.' || i.table_name || ' to z';
      END LOOP;
    END;If Z does not need the privileges granted directly, you would probably be better off creating a role, granting the privileges to the role, and then granting the role to Z. That will make it easier in the future if you need to create another user that has the same privileges as Z.
    Justin
    Edited by: Justin Cave on Oct 15, 2012 11:50 AM

  • GRANT to a Schema?

    If someone could help me out with this, I'd really appreciate your help. We have a rogue programmer who can't seem to stop writing UPDATE queries against our production instance. :)
    We are using Oracle Applications, FYI. We've set up a developer with his own login with basically read-only access to the entire database. Is there any way we can give him write and create access to just a particular schema? He'll need access to update and create tables in our CUSTOM schema, but all other schemas need to be read-only.
    I'm farily new to Oracle, so if you could explain this like you would to a four year old, I'd sure appreciate it. :)
    Thanks so much!
    Steve

    I suspect you will need to repost in the Oracle Applicaitons forums.
    The header page is at http://forums.oracle.com/forums/category.jspa?categoryID=11 and the forum I'd try is "Managing Oracle Applications"

  • Granting Pvivileges on a schema

    grant all on schema schemaname to user
    when i execute this command missing keyword error is shown..how can i resolve??

    Thats qustion pertaining to database section as it your first post so i am answering you becareful next time
    SQL>
    SQL> sho user
    USER is "SYSTEM"
    SQL> select * from system_privilege_map
    2 where name like '%PRIV%';
    PRIVILEGE NAME PROPERTY
    -167 GRANT ANY PRIVILEGE 0
    -244 GRANT ANY OBJECT PRIVILEGE 0
    SQL>
    SQL> -- Create a new user with just create session (to log on) and grant
    SQL> -- any privilege to, well grant all privileges.
    SQL> create user emil identified by emil;
    User created.
    SQL> grant create session, grant any privilege to emil;
    Grant succeeded.

  • Oracle  grant schema level security

    I am having more schemas for different applications in the same database.
    Each time an object is created it access is granted to the appropriate role.
    I don't like using the SELECT ANY TABLE privedge.
    I would love to see a GRANT SELECT ON SCHEMA XXXX To ZZZZZ;
    This would be almost like the SQL SERVER (YUK) DB_DATAREADER priviledge.
    I have not seen anything to indicate Oracle 11g has this support.

    Are you just complaining or asking a question?
    You can use
    Something like:
    create or replace trigger do_grant
    after CREATE on schema
    declare
        l_str varchar2(255);
        l_job number;
    begin
        if ( ora_dict_obj_type = 'TABLE' )
        then
            l_str := 'execute immediate "grant select on ' ||
                                         ora_dict_obj_name ||
                                        ' to scott";';
            dbms_job.submit( l_job, replace(l_str,'"','''') );
        end if;
    end;
    /as posted here in asktom
    http://asktom.oracle.com/pls/asktom/f?p=100:11:4434422967201937::::P11_QUESTION_ID:646423863863

  • Executing queries in another schema in an APEX application

    Hello all,
    I'm using Application Express 2.1.0.00.39 with Oracle Database Express.
    Following this post (Re: Including a SQL GUI in APEX applications I made a page that executes users' queries. The user inputs his SQL statement in a textarea and submits the page, then a new region returning the query results is displayed. Actually I did hardly the same as Vikas did here: http://htmldb.oracle.com/pls/otn/f?p=24317:228:4426360772935581::NO:::
    However my needs are very specific: as there will be a lot of users and all users will have their own schema, I need to execute the queries a user inputs in his own schema and not the default parsing schema.
    I looked around and found a few solutions.
    First, GRANT. But I can't grant the default schema priviledges on all users' schema. It will permit everyone to work on all schemas and I don't want that. I want to force the parsing schema to be the same as the user authentified.
    Next, I found that post: Re: how to connect to another user from a named pl/sql block. I tried the EXECUTE IMMEDIATE but it won't work with the CONNECT statement.
    Finally I found that post: Change Parsing Schema dynamically? I tried to put the ALTER SESSION in a process. The success message appears, meaning the statement was executed successfully. But the query in input is still executed in the APEX default parsing schema. Then I tried to put the ALTER SESSION statement in the Report (which is a PL/SQL function body returning a SQL query), like that:
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA=:APP_USER';
    RETURN v('P2_QRY_TEXT');
    END;
    It didn't work either.
    What should be the best practice for my problem? Is there anyway to do what I want?
    Thanks,

    Re-thinking my solution:
    Instead of having the package for each user, make 1 schema hold the package (whichever represents your system and not a user). Then declare the package to run as AUTHID CURRENT USER, which should make the calling schema's privileges be active. That way you avoid the hassle of having the manage 1 package for each user.
    User Shema ===(SQL QUERY)==> Your System's Schema ==(QUERY) ===> Your Package w/ Authid Current User ==(Dynamic SQL Execution) ==> END
    For your package, you might want to consider implementing/simulating variable argument lists, so that you can provide binds if necessary. You would just match up the binds within the query (using dbms_sql would be the only way, execute immediate does not give supporting query information) to the corresponding arguments.
    I'm not sure what your goal is, but at least you have a direction to run in/at.

Maybe you are looking for

  • Photoshop CS6 keeps crashing on save

    Hi, Cs6 is crashing a lot when I save images a jpegs. I have disabled font preview, validated my fonts and deleted any that seem to be dodgy. This is a new problem..I've been using the software happily for ages and no problems like this. I've also cl

  • How to display an image if user does not have flash installed?

    Hi, Not all people have flash and the ones that don't will have an unpleasant experience on my website. How can I display an image instead of the flash itself for people that don't have flash who visit my website? I just have flash on the upper porti

  • What do I do if my Logic Studio Serial number was stolen, box and all?

    So, my box for Logic Studio that I've had since 2010 was stolen, as well as my old computer...and external hardrive where the serial number was backed up. Can apple verify it is me via email, social security, anything, or am I just kind of screwed, a

  • BOM Explotion in Inbound Delivery

    Hi All, When i do PO the system shows the BOM details, but when I do Inbound Delivery reference to PO the system shows only the header material not the sub components. How to explode the details similar to PO Regards GK.

  • SAFT PT - SelfBilling Tax

    Hi, I'm currently trying to validate a SAFT-PT with Self-Billing documents, in accordance to the Law Decree 160/2013, and I get an error in the Tax Authority's website saying that the element <Tax> in document line ( <Line> ) is not expected. I've ch