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.

Similar Messages

  • Grant Permission base on Scheme ?

    Is there any way to grant permission base on scheme ??
    e.g.
    I want to allow user to select all table in another scheme. Beside grant permission for each table one by one, is there any way to do this ??

    There is no single privilege grant for this-- you'll have to grant privileges on individual objects. Of course, you can script these grants using a few lines of PL/SQL, i.e.
    DECLARE
      sqlStmt VARCHAR2(1000);
    BEGIN
      FOR x IN (SELECT * FROM user_tables)
      LOOP
        sqlStmt := 'GRANT SELECT ON ' || x.table_name ||
                   ' TO <<another user>>';
        EXECUTE IMMEDIATE sqlStmt;
      END LOOP;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Grant access to specfic schema

    Is there any way that these permissions could be created without the ANY clause?
    CREATE ANY CONTEXT
    DROP ANY CONTEXT
    EXECUTE ANY PROCEDURE
    EXECUTE ANY TYPE
    I got access to only one schema ..Client side DBA are not permitting access to "ANY" clause but they are ready to grant access like create context, drop context etc ..Is there any access like CREATE CONTEXT, DROP CONTEXT,EXECUTE PROCEDURE,EXECUTE TYPE for to give access to one user alone..etc ???
    Advice me on this !!
    Regards
    dkoracle

    Pl post details of OS and database versions.
    Have you read the documentation ?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_5002.htm#i2060927
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_8008.htm#i2099532
    If so, what have you found ?
    If not, I think it is time to read up !
    Srini

  • GRANT rights 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

    Yes, you can grant privs in modular way, or you create a Role and grant required privs to the Role and grant that role who ever needs in the development team this way you need not have to redo the grants everytime a new developer joins.
    Refer to creating and using Roles in Oracle Documentation Guide on OTN.

  • 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

  • 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

  • Grant details required for user and schema

    Hi
    I have Oracle version - 10.2.0.4.0
    We have Schema A (Lot of objects exist) and User B (No objects exist - acts as application user to access objects in other schema).
    I have listed below doubts.
    1) I want to know the method to find the list of users have access to objects in Schema A and privileges granted for the objects in Schema A
    2) I want to know the method to find the list of grants provided to the schema objects to the user B

    user1368801 wrote:
    Thanks ajallen.
    It really helped me.
    one more question. I think DBA_TAB_PRIVS gives details for tables only right.
    What about other objects like procedures, views etc. Go back to the Reference Manual and re-read the description of DBA_TAB_PRIVS. Re-read the specific description of TABLE_NAME.
    >
    Actually I am exporting 3 schemas (A,B,C) from production and importing them to test environment (A1, B1,C1) using fromuser and touser option.
    Now I have to properly remap all the privileges, grants, synonyms etc.
    There are so many objects and I am wondering how to remap properly.
    It may be simple, as a newbie, your direction will be more helpful

  • Error in Loading a BLOB Column in Oracle Database from 1 to diff  schema

    Hi ALL,
    I am in a POC where in I have to load a BLOB data from 1 schema to a different schema ie from Staging to Target.
    I load my staging(Oracle Schema ) through Oracle PLSQL. Now I have to load to my ODS.
    I am using the LKM (LKM SQL to Oracle) and IKM (IKM Oracle Incremental Update PLSQL).
    It errors out in the 3rd step 3-Loading-SS_0 Load Data
    The script used and the error message is in the attachment. However if I run the script manually it runs and the Load happens successfully. Also I was able to load the same BLOB objects it the tables were in the same schema(In this case LKM is bypassed).
    Any Thoughts on this?
    The Error I receive is:
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at oracle.jdbc.driver.OracleResultSetMetaData.getPrecision(OracleResultSetMetaData.java:303)
         at com.sunopsis.sql.SnpsQuery.getResultSetParams(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Thanks & Regards,
    Krishna

    Hi,
    Are you at the same database? If yes is better to grant select, at the schemas where is the source, to your Staging Area user.
    Then, at topology, define all physical schemas under the same Data Server.
    If you are at distinct database a good solution is to use a DBLink (KM) because when a SQL to SQL KM is used, the data go thru agent, making a conversion to Java.
    I'm not sure if it can handle LOB's fields... Every time that I needed to use it was in the ways that I described.
    Does it make any sense to you?
    Cezar

  • Oracle Data Integrator 11.1.1.5 Work Schema - List of Privileges

    Hi All,
    Oracle Data Integrator 11.1.1.5.
    Extracting data from Oracle DB for Oracle EBS 12.1.3.
    Customer created read-only schema (XXAPPS) to extract the data from EBS.
    For ODI Work schema we now created one schema 'XBOL_ODI_TEMP' on the source DB. We are now looking for appropriate privileges that needs to be granted to XXAPPS and 'XBOL_ODI_TEMP' so that we won’t face the any error messageS related to permissions when we run ODI scenario?
    We are now facing the error message : ODI-1227: Task SrcSet0 (Loading) fails on the source ORACLE connection VTB_ORACLE_EBS_1213.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist.
    Similar previliges can be granted to the work schema on target.
    Venkat

    i think it would be fine with only one schema(user) created at the source system which has got read access on the tables of the EBS DB. Now to resolve this error, assuming XXAPPS user is the one used,
    in the topology --> data server(for EBS) --> physical schema the EBS schema name could be selected for Schema and XXAPPS as the work schema(for all ODI work related objects e.g. CDC)
    Also, in the Data server the user XXAPPS needs to be used which has read access to EBS tables.
    Now everytime ODI generates a query it will access a table lets say DUMMY as ,<EBS Schema>.DUMMY thus the reference is made.
    Alternatively, you can create synonyms for EBS tables in XXAPPS schema.

  • Database with many schemas - query schema depending on user

    Let's assume we have a number of schemas in a database (hundred or so), which all contain the same tables.
    The customer wants one application express application which accesses only the schema corresponding to the user that is currently logged in.
    So database schema user1 contains table EMP, and schema user2 also contains EMP. Now the application is assigned both schemas user1 and user2, and when user2 logs in he only sees database schema user2.
    Is this possible with Apex? I've tried both built-in authentication and database authentication for the application, but found out this is truly only about authentication, because the query is always executed by APEX_PUBLIC_USER.
    How can I manage which schema is accessed with the authenticated user?
    Thanks in advance!

    Patrick,
    Every apex application has an "owner" attribute which is used as the parsing schema. All SQL and PL/SQL in your app is parsed as that schema using that schema's privileges. It is as if your application were a definer's rights stored procedure in that schema. The APEX_PUBLIC_USER schema is simply used to create the session and has no bearing on privileges. Currently there is no way to change the owner attribute of an application at runtime. However, your application can operate with any schema in the database according to the privileges granted to the parsing schema. Something along the lines of what you described was discussed at length in the following thread, maybe it will give you some ideas to try out: Access to owner schema throught APIs
    Scott

  • Code and core tables in different schemas

    Hi,
    My db version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    I would like to understand, the pros and cons of the following situation:
    We have a single application.
    The db design for this application has 44 tables out of which 28 are core tables related by PK and FK relationships. The remaining 16 are look up and reference tables which are not related to any.
    The team decided to place the 28 core tables in one schema A and the remaining 16 in another schema B within same database. (The reason for this is..since it is done in other projects lets do it here too).
    Now comming to the code (stored procs, functions, packages etc). The teams wants to place most of the code in the schema B that has the 16 ref tables. (the reason again being the same).
    What are the pros and cons doing this???
    Please advice.
    PS:
    I have googled and found sth on these lines:
    cons: 
    o harder to manage
    o harder to upgrade
    o harder to patch
    o harder to maintain
    o causes your shared pool size to increase 1,000 times (shared sql goes down the tubes)
    o takes more space
    o queries against the dictionary will be impacted
    o latching on the shared pool goes WAY up (latching = locks = serialization device =
    slows you down)
    pros:
    o none that I can think of.

    >
    I would like to understand, the pros and cons of the following situation:
    Yes I am straining to find more points (was not good at it though).
    >
    You just want to understand? Are you sure? Your thread reads more like you just want to do things your way and are looking for support.
    >
    The team decided to place the 28 core tables in one schema A and the remaining 16 in another schema B within same database. (The reason for this is..since it is done in other projects lets do it here too).
    Now comming to the code (stored procs, functions, packages etc). The teams wants to place most of the code in the schema B that has the 16 ref tables. (the reason again being the same).
    >
    My question to you is: what PROBLEM are you trying to solve? If the 'team' already uses this approach and there haven't been any substantive problems then why try to change things now? Why have you chosen to fight this battle?
    Your 'team' has already decided and now, after that decision, you want to argue about it with them? The time to present arguments for/against a given plan is BEFORE the decisions are made, not after. Once a decision is made you need to be a team player and implement that decision to the best of your ability.
    One thing I'm certain of. If you try to support your argument using things like that 'AskTom' link you posted any credibility you had will go out the window. That link, as you already hinted yourself, is not your use case at all. All it takes is for one of your 'team' members to point that out and everyone will pretty much stop listening to any other arguments you make.
    People are generally not going to 'change their ways' unless you can show them:
    a) there is something seriously wrong with the way they are now doing things or
    b) a new way of doing things provides some substantial benefits
    Choice 'a' above is where you need to start but you haven't provided ANY information in this post that you have identified any serious issues with the status quo.
    The main task for Oracle is to be able to FIND the objects being referenced. So, in my opinion, that is what you should focus on when looking for PRO/CON arguments.
    That is: What issues are there if an object being referenced is in a different schema than the session that needs to use the object?
    1. objects may need to be prefixed with the schema name
    2. public or private synonyms may need to be created/maintained to avoid having to deal with item #1 above
    3. new grants may be needed to implement/maintain the proper security
    4. new roles may need to be created to maintain proper security (see item #3 above)
    5. additional work will be needed to maintain the new roles in item #4 above
    6. PL/SQL code may not be able to reference the object or may reference the wrong object
    7. Roles are disabled in PL/SQL (see item #6 above) - this means that the new grants (see item #3) may need to be granted directly to the schema users that need access instead of to roles. That can make it harder to create and maintain a role-base security schema.
    If I were you I would spend my time on other more important thingsd. But if I chose to fight this particular battle then I would make a list of problems that occured in the past with the current method of doing things and also problems related to the above list of items and then show how many of those problems will 'disappear' if the new method is used.

  • Create Schema via PL/SQL block from textbox

    I'm trying create a user based on a text box that the user/dba will enter. Is there not a way to use a bind variable for what is entered into the textbox, here is my pl/sql block:
    BEGIN
    EXECUTE IMMEDIATE 'create user :SCHEMA identified by :SCHEMA
    DEFAULT TABLESPACE USERS
         TEMPORARY TABLESPACE TEMP
         QUOTA 0 ON SYSTEM
         QUOTA UNLIMITED ON USERS
         PROFILE DEFAULT';
    end;
    Any help is appreciated!

    Ok, This work for creating the user now:
    BEGIN
    EXECUTE IMMEDIATE 'create user &SCHEMA. identified by &SCHEMA_PWD.
    DEFAULT TABLESPACE USERS
    TEMPORARY TABLESPACE TEMP
    QUOTA 0 ON SYSTEM
    QUOTA UNLIMITED ON USERS
    PROFILE DEFAULT';
    END;
    All I did was change the textbox to just a textbox w/o submit and made the password a submit password and it worked, now I am getting insufficient priviledges when I try to add in:
    BEGIN
    EXECUTE IMMEDIATE 'create user &SCHEMA. identified by &SCHEMA_PWD.
    DEFAULT TABLESPACE USERS
    TEMPORARY TABLESPACE TEMP
    QUOTA 0 ON SYSTEM
    QUOTA UNLIMITED ON USERS
    PROFILE DEFAULT';
    EXECUTE IMMEDIATE 'GRANT CONNECT,RESOURCE TO &SCHEMA.';
    EXECUTE IMMEDIATE 'ALTER USER &SCHEMA. DEFAULT ROLE ALL';
    END;
    I have disabled Authentication and made it DAD..which is the HTMLDB_PUBLIC_USER which has dba role..but still gives me insufficient priviledges. Any help is appreciated!

  • Grant create index question

    How do I grant "create index" on any table to a user.
    Is it "grant create index to <USER1>

    User must be granted with ALTER OR CONTROL Permission to create an index.
    GRANT ALTER,CONTROL ON SCHEMA::SALES TO <User>
    --Prashanth

  • NEWBIE: Database vs. Schema

    I'm a student coming from a MS SQL environment. I couldn't figure out how to create a new database in XE. Is an Oracle schema the equivalent of a SQL database?
    I was not able to locate any documentation discussing the differences. Any help or links would be greatly appreciated.

    I never connected to ms sql environment, so I cannot tell for sure, but will try to describe how it works in Oracle.
    In Oracle terminology a database is just a set of files (datafiles, redo logs, control files...). A database may be opened by one or more (->rac) instances (an instance is only some processes... PMON, SMON etc... plus some memory... SGA)
    When the database is opened by an instance you can connect and create users, and assign them resources (disk space, via quotas on tablespaces). Users create objects in their space, and these objects constitute the schema.
    Object in a schema may be (or not) granted permissions to other schemas (you can select on tables belonging to other schemas)
    You do not need to create a new database (in fact XE is limited in this, you can only run one per time), but you can create as many users and schemas you like, providing in this way necessary isolation among applications.
    Hope this helps,
    Andrea

  • 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

Maybe you are looking for

  • Why is this so long to recognize a new RAW format?

    Hi, I'm new to Mac and to Aperture. I use it with Dimage A1. It's great! But I am disappointed because I also use Pentax K10D which is not recognized by Aperture. I notice that it needed much time to import *ist RAW format. Is this so difficult to in

  • 3D greyed out in photoshop cc

    Hi, I'm having a problem with the 3d options, I've looked on previous discussion where the issue was based on changing from CMYK to RGB, but this doesn't solve my issue. System Info :- Adobe Photoshop Version: 14.1.2 (14.1.2 20130923.r.427 2013/09/23

  • How to play all exept one album

    Hello there! Is it possible to play all music except one album without organizing or using a playlist? If yes can you teach me? Thanks

  • Transfer photos from camera to ipad

    I just updated iOS to 7.1. Since then I cańt transfer photos from my camera to my IPad mini. I get message that the device requires too much power. I bought the ipad, mainly to transfer photos directly from camera when travelling. Many thanks for you

  • Owl Orphanage Error (no, I'm NOT kidding!)

    I am hoping someone can help me out with this problem! I have Adobe CS4 with Photoshop v11.0.1 loaded on a Dell Optiplex 755 running WinXP Pro SP3 with 2.66 GHz, 3.25 GB of RAM, 150 GB hard drive. It has been running without issue for a few months no