Create table for users

Hi all

11.2.0.3.10

AIX6

I created a user SCOTT in our database.

I have grant connect, resource to scott; because it is easier to do it this way.

DBA, I wish that I'm the only one to create all the tables of scott, and he cannot create for himself.

What is the effective way to do this? Is this order enough? > REVOKE CREATE a TABLE FROM SCOTT;

Thank you

MK

RP gave you the right answer if you want to restrict users to create table, do not give them privilege resource.  See this demo:

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With partitioning, OLAP, Data Mining and Real Application Testing options

SQL > create user test identified by the test.

Created by the user.

SQL > grant connect to test;

Grant succeeded.

SQL > connect test/test;

Connected.

SQL > create table tab1 (a number);

create table tab1 (a number)

*

ERROR on line 1:

ORA-01031: insufficient privileges

SQL > connect sys/pw as sysdba

Connected.

SQL > grant create table to test;

Grant succeeded.

SQL > connect test/test;

Connected.

SQL > create table tab1 (a number);

Table created.

SQL > connect sys/pw as sysdba

Connected.

SQL > revoke create table test;

Revoke succeeded.

SQL > connect test/test;

Connected.

SQL > create table tab2 (a number);

create the table tab2 (a number)

*

ERROR on line 1:

ORA-01031: insufficient privileges

SQL >

Concerning

Girish Sharma

Tags: Database

Similar Questions

  • Acrobat Pro DC can create forms for users of Reader?

    Usually when Adobe re-craft their software I can quickly understand what is different. I can't for the life of figure me out how to take an existing PDF form and then go to fill in Adobe Acrobat Pro MS. Allows me the user to fill out, but I want to create a form to fill out to validate that any user with reader can fill. They have reinvented the wheel here, and I want to just enjoy the new information about the way in which the H to do quickly. Thank you! :))

    In the right pane just select: form prepare

    If you have accelerators keys activated in the preferences, you can simply press A to enter the form editing mode.

  • Create roles for users to see only what they have to do

    Hello world
    I created a Menu using Forms 6i and I would like to know the steps to create a role, then assign roles to my menu so only users can see the programs they use and not what administrators will use as some options under one of my menu called maintenance.

    If you mean that I have to open the Module roles under Security Menu and write a name for each role on this small window appearing? For example, I want a role to be called SHOW_MENU then I type this name on this window and that's it?

    No, it's just the definition that this role is relevant to the menu. In the next step, you assign this role to each menu item which should be accessible with the role.

    After this do I need a special order on Oracle to assign this role to the user and to tell the database I want that the user just to see this menu item?

    Do not say the database something on the menu, the database doesn't know what a menu is. You assign the role to a database user, then on forms check roles are assigned to the user, and with this information the menuitems controls should be presented to the user.

    The command to grant a role to a dbuser is

    GRANT  TO ;
    
  • Security ADF of application using DB tables for users and roles

    Hello
    I followed the below documents to use SQL authentication instead of jazn.

    http://Biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html


    http://Biemond.blogspot.com/2008/12/using-WebLogic-provider-as.html

    The second paper after completing the ADF Security Assistant, there are steps to create roles and application below at point

    * "We need to use myrealm as Kingdom and not jazn.com. Create the role of valid users. "

    Could someone suggest where to put these roles?

    Thanks in advance!
    Vinod

    Hi Vinod,

    If you set up SQLAuthenticator in the JDeveloper's integrated Weblogic Server, so what happened to your case is expected, because you deleted the Weblogic instance where SQLAuthenticator has been configured. Yes, you have deleted the domaine_par_defaut instance that is located in the directory specified above. JDeveloper will recreate a new instance (not configured) the next time you run.

    To avoid reconfiguring SQLAuthenticator, you must set it up on a stand-alone instance of Weblogic (which is not located on the JDeveloper/systems user... folder.

    Kind regards

    Pino

  • Creating roles for users to use on Forms 6i

    Hello world
    I'm about to create new roles for use on Forms 6i so only a few teachers can access the items I want to use them, but I don't know if I should create the rolls like this: < role name > role or create the role with a password like this: create the < role name > role identified by < password >

    Can someone help me please?

    Hello

    If it is only to filter the forms menu options, you don't need to assign passwords.

    François

  • How to create tables for use in php/SQL Web site

    Sorry to ask the fundamental question because I am known.

    I built a site dw to registration of several products. I was following DW, the Missing Manual book tutorials. The tutorial provides data downloadable tabels in a folder with the extension .sql. I can't find anywhere a statement that the way in which the .sql file is created.

    Second question: if it can be created in Access 2007, please tell me how.

    Thank you very much.

    Try reading the following article for some tips. http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html. Life becomes much easier when you understand the basic principles of standardization.

  • SQL authentication provider - create table script

    Hi all!
    I would use the SQL provider for my Web application authentication. I can't find the script to create tables of users/roles used by the provider.
    Can you suggest me a link where I can download?
    Thank you
    Frank

    Hi Frank,.

    Configure the SQL authenticator:

    Start Oracle XE DB and open propmt SQL to run commands below:

    CREATE TABLE USERS)
    U_NAME VARCHAR (200) NOT NULL,
    U_PASSWORD VARCHAR (50) NOT NULL,
    U_DESCRIPTION VARCHAR (1000))
    ;
    ALTER TABLE USERS
    ADD CONSTRAINT PK_USERS
    PRIMARY KEY (U_NAME)
    ;
    CREATE TABLE GROUPS)
    G_NAME VARCHAR (200) NOT NULL,
    G_DESCRIPTION VARCHAR (1000) NULL)
    ;
    ALTER TABLE GROUPS
    ADD CONSTRAINT PK_GROUPS
    PRIMARY KEY (G_NAME)
    ;
    CREATE TABLE GROUPMEMBERS)
    G_NAME VARCHAR (200) NOT NULL,
    G_MEMBER VARCHAR (200) NOT NULL)
    ;
    ALTER TABLE GROUPMEMBERS
    ADD CONSTRAINT PK_GROUPMEMS
    (PRIMARY KEY)
    G_NAME,
    G_MEMBER
    )
    ;
    ALTER TABLE GROUPMEMBERS
    ADD CONSTRAINT FK1_GROUPMEMBERS
    FOREIGN KEY (G_NAME)
    REFERENCE (G_NAME) GROUPS
    ON DELETE CASCADE

    Generally, customers can add users directly in DB with help commands below:

    insert into USERS (U_NAME, U_PASSWORD, U_DESCRIPTION) values ('system', 'weblogic', 'user admin');
    insert into GROUPS (G_NAME, G_DESCRIPTION) values ('Administrators', 'Administrators');
    insert into values('Administrators','system') GROUPMEMBERS (G_NAME, G_MEMBER);

    But in this case is not encrypted password then, either you can add users via the console or WLST script to be stored in encrypted form.

    We had performed above commands just to check that the user that is stored directly in the DB gets properly authenticated or not configured SQL authenticator as below

    Now start weblogic admin server and console access to create the data source by the navigation Services-> JDBC-> data sources

    Create the data source named SqlDS

    JNDI: SqlDS

    Type of DB: Oracle

    : DB driver Oracle Thin XA

    Name of the data base: XE

    DB host:

    Port: 1521

    DB user:

    DB password:

    Even the rest of the configuration and click test Configuration. If its success click on next and it targets to "AdminServer.

    Click Finish and activate chnages

    Now navigate to the areas of security-> myrealm-> suppliers

    Click new and supply the names of SqlAuthenticator and select Type of SQLAuthenticator

    Now click on newly created provider and make the indicator of control as "sufficient".

    Go to the specific page of provider:

    1. check on cleartext passwords enabled.

    2. provide a data name source: SqlDS

    Keep the rest of the parameters it is and save this configuration. It will ask you to restart the management server.

    Now, again navigate areas of security-myrealm-> users & groups >

    User created directly in the DB control is listed in the table with SqlAuthenticator, once its list, go ahead and add users as below

    B. Cretae users using the administration console:

    Sign in to the administration console

    Access areas of security-myrealm-> users & groups >

    Click the users tab and try to create the new user

    User name:

    Select authentication provider: SqlAuthenticator

    User password:

    Once the table DB check creating user, this user added with password encypted musted

    C. create multiple users using WLST script:

    File Navigave of $DOMAIN_HOME/bin and run the file setDomainEnv as below:

    UNIX:. ./setDomainEnv.sh (don't forget to put two points before /)

    Windows: setDomainEnv.cmd

    Now, change script depending on your environment below and run as suggested in step 3:

    Connect('weblogic','weblogic123','t3://localhost:7001')
    Edit()
    startEdit(-1,-1,'false')
    serverConfig()
    CD('/SecurityConfiguration/base_domain/Realms/MYREALM/AuthenticationProviders')
    ls()
    CD ('SqlAuthenticator')
    cmo.createUser ('vaishali', 'weblogic123', 'SQLuser')

    cmo.createUser ('pavashe', 'weblogic123', 'SQLuser')
    Edit()
    stopEdit('y')

    NOTE: Change username, password, and ADMIN_URL in 1st line.

    Replace the domain name "base_domain" by your domain online no.: 5

    Authenticator name change SQL online no: 6 by your authenticator name

    Next lines create users. You need to add however to users, you need to create programmatically.

    Syntax: cmo.createUser ('user_name', 'user_password', 'user_description')

    Now, to save these commands in a file with the extension .py and run as below:

    # java weblogic. WLST create_user.py

    If your script does not have to try running each command separately. For this session WLST beginning as below:

    # java weblogic. WLST

    Now run above commands in the script. You will be able to debug if something went wrong during execution of script.

    Kind regards
    Kal

  • Is there a system table that stores scripts "create table".

    Oracle which contains the scripts 'create table' for a table of system tables defined in a schema exist?

    I know that I can build with SQL querying the user_tab_columns, but I was wondering if the overall DML
    statement is already stored in another system table. In the Toad from Quest Software, you can simply go to the 'schema', "Tables," Brower
    Then select the "Script" tab and it shows you the statement 'create table' for the table that you are
    looking at. I wonder if Toad backstage is to build this script 'create table' via the user_tab_columns
    table or using another system table.

    Thank you in advance,
    Wes

    You can use the DBMS_METADATA. Procedure GET_DDL for details regarding the ddl statement used to create the table.

  • Licensing procedure to create the table for the new user

    Hi all
    I have created one new User, and give GRANT CREATE SESSION TO USER. But after that from which grant, i would be able to create table and other object, specially for table.
    Thank you
    Brij

    The role of resource works in your case, as it consist from under privs

    grant resources to ;

    
    GRANTEE                           PRIV NAME
    --------------------------      --------------------------
    RESOURCE                          | CREATE CLUSTER
                                       | CREATE INDEXTYPE
                                       | CREATE OPERATOR
                                       | CREATE PROCEDURE
                                       | CREATE SEQUENCE
                                       | CREATE TABLE
                                       | CREATE TRIGGER
                                       | CREATE TYPE         
    

    Please close the message if you feel that you have the answer and to clean the Oracle forum.
    https://forums.Oracle.com/forums/Ann.jspa?annID=885

  • As sysdba, how to grant create table to a user for a particular tablespace?

    I did the PRACTICE tablespace and user SEAN. How can I give SEAN the privilege to create a table in the practical tablespace?

    CREATE TABLESPACE PRACTICE
    DATA FILE
    ' F:\DBM\FALLB\DB2046\ORACLE\ADMIN\ORAC...
    SIZE 20 M
    DEFAULT STORAGE OF DICTIONARY OF MANAGEMENT MEASURE (1 M INITIAL FOLLOWING 1 M MAXEXTENTS 20 PCTINCREASE 0);

    CREATE USER SEAN
    IDENTIFIED BY SEAN
    PRACTICE OF TABLESPACE DEFAULT;
    GRANT CREATE SESSION TO SEAN;

    -----------------------------------------------
    -----------------------------------------------
    SEAN GRANT SYSDBA;
    +
    Sean/[email protected] CONNECT as sysdba

    Works, but what happens if I don't want SEAN have sysdba privileges?

    -----------------------------------------------
    -----------------------------------------------
    Another question would be if I don't give SEAN sysdba privileges and then I connect like sean and then perform a
    SELECT * FROM TAB;
    to display the available tables, how can I do so that I can only see the paintings I do myself instead of all tables in the database?

    Hello

    Connect as sys and grant after privs to SEAN, I added a few privileges as well.

    Do not give any user other than SYS sysdba priv, unless you intend to use user SEAN as a user administrative addition to SYS.

    GRANT RESOURCE TO SEAN;
    GRANT CONNECT TO SEAN;
    GRANT CREATE SESION TO SEAN;
      -- GRANT UNLIMITED TABLESPACE TO SEAN;
    GRANT CREATE VIEW TO  SEAN;
    GRANT CREATE PROCEDURE TO SEAN ;
    GRANT CREATE TABLE TO SEAN
      -- 1 Tablespace Quota for SEAN
    ALTER USER  SEAN QUOTA UNLIMITED ON PRACTICE;
     
    

    Concerning

  • Creating table in the schema has with the user B and granting permissions to the user C

    Hello, I have a problem fun - we have a large table which requires a batch to make millions of updates, and he needs to finish more quickly. It takes several hours as an update, but a select create table did the same thing in about a minute. Yay! Then we just delete the old table and rename the new table to the former, rebuild all the index and grant select/insert/update/delete permissions to another user who needs access... and there is the problem, Oracle said insufficient privs.

    We have A figure, which is the owner of the table, userid B who done all the stuff of application batch and userid C which performs inserts for a process of middleware. None of them are actual users, of course. We want that user B to do the ETG, rename, rebuild and re-grant of the authorisation of the index. But user B apparently cannot grant permissions on objects in the schema A to user C, even if B has created the table and has the role DBA (not ideal, I know)!

    What's really crazy is that there is no sense unique user b can grant permissions to user C, which is to:

    grant select any table USER c;
    grant insert any table USER c;
    grant update any table USER c;
    Grant delete any table USER c;

    It seems really perverse can create tables in diagram A and even grant C privs "whole table" that user B, but may not grant privs specifically on this object in the schema A, even with DBA privs. I must be missing something... right?

    Yes. By default, the stored procedures are stored procedures from DEFINER rights. If A is the owner of a stored procedure, this stored procedure can do whatever A enjoys the privileges to directly. If A grants B privileges RUN this stored procedure, when B calls the stored procedure, the procedure runs with the privileges.

    I agree point stew, however, re-creating objects in Oracle is generally a bad idea and a TRUNCATE with one insert direct-path, possibly combined with the deactivation and the rebuilding of the index would be more appropriate than a DEC. If you're going to stick with this Assignment, however, that really do in a stored procedure owned by A while B has no need to CREATE ANY TABLE.

    Justin

  • Schema authorization for users stored in a database table?

    Hello!

    I'm trying to find how to make a diagram of authorization for users of the database.

    I did one of my current application authentication scheme, I named it "Authentication for database accounts", and the type of plan is 'Database accounts'.

    A word of explanation:_
    I have a table in my database, named "USERS". Inside this table, I have the following columns:
    -USERNAME (NUMBER)
    -USERNAME (VARCHAR2 (50))
    -PASSWORD (VARCHAR2 (50))
    -E-MAIL (VARCHAR2 (200))

    For that matter, I'll take a user from the example. The user name is the USER and the USER password. Email and username don't matter here, but let's say that the user ID is 1.

    What I want:_
    When you go into the application and you are prompted to connect (page 101), then I want a user to be able to connect with the data that has been stored in the USERS table.
    So, on the login page, the user will enter USER as user name and USER password. The authorisation scheme must verify whether or not this user name and password match the data in the USERS table. If so, he must sign the user with the credentials entered by the user (who are the USERS and USER).
    I also want the username to be stored somewhere in the application (if possible, in a part of the application).

    How can I do this? I've never done a prior authorisation scheme... I'm not too good with PL/SQL either, but I'm working on this part.

    Any help is greatly appreciated.

    Hi Magali,.

    In your existing structure of the table, add a column more called ROLE as MANAGER, CLERK etc then you can create the authorization on the basis of the ROLE not not based on the individual user

    Select your application and then go into shared component
    under Security, select schema permission and create

    Step 1: create the authorization scheme
    (1) create the authorization scheme = zero
    name 2) = IS_MANAGER / / the name of
    schema type 3) = exists SQL Query
    (4) SQL Query is 1 select table_name from where upper (username) = upper(:APP_USER);.
    or if you have the role of your table then try this
    (4) SQL Query is 1 select table_name from where = 'MANAGER' ROLE and upper (username) = upper(:APP_USER);.
    (5) identify error message appears when the regime violated = your error message.

    your authorization scheme is now ready.

    Step 2: assign this regime to the components of the page

    modify any component of your page like region, button, article page etc...

    where you will find the guarantee under what you have permission regime selectlist, than choose any schema that you want to apply.

    Permission schema = IS_MANAGER / / that I had created in example above

    For tabs
    change your tab, then you have permission and do the same thing as above.

    In this way, you can create a permission scheme and assign to the components page etc...

    Hope this will give you an idea on the authorization scheme

    Thank you
    Jitendra

  • [10g] calls for more information on CREATE TABLE?

    Is it possible to put something in place that invites you to insert a piece of information at any time a table is created?

    I have a table:
    CREATE TABLE     my_table_notes
    (     table_name     VARCHAR2(30)     NOT NULL
    ,     table_owner     VARCHAR2(3)     NOT NULL
    ,     date_added     TIMESTAMP     NOT NULL
    ,     notes          VARCHAR2(2000)
    ,     CONSTRAINT     dtn_pk     PRIMARY KEY (table_name, table_owner, date_added)
    );
    Where do I put the notes on the tables, that I added to my database. These notes are mainly to remind me exactly what is in the tables. I have a number of tables with similar names and similar columns, such as desc table does not always information that I need to remember what is a table. Yes, I could keep a document text or something with this information, but I like to have in the database.

    What I was asking is, is there anything I can do which will automatically ask me after I created a table, in order to enter comments on this table, such as the instruction insert the following would be generated?
    INSERT INTO     my_table_notes
    VALUES (<table just created>, <owner of table created>, SYSTIMESTAMP, <comments I provide on prompt>);
    I work in 10g (XE on my local machine)

    Published by: user11033437 on July 14, 2011 09:31: Oracle version added

    If you happen to start with serveroutput enabled in SQL * more permanently, a DDL trigger could potentially just released a note reminding you to create a comment. If you do not set serveroutput, you don't see the message. And, of course, you could easily ignore the message that came out. If you want just a friendly reminder, this is enough.

    Because PL/SQL runs on the database server, there is no way to ask a user for something - it has no facilities to get a user input. SQL * Plus has the ability to ask a user for the data, but then you need to run a given SQL * more script to create a table that seems much too heavy for the situation you describe.

    Justin

  • ORA-00604 with ORA-20010: the user is not authorized to CREATE Table

    Hello

    I use 11.1.0.7 database

    I'm only running this SQL logged on as a schema PLAN. PLAN scheme a DBA privilege but I receive error message-
    create table SALARY.test (ID NUMBER);
    create table SALARY.test (ID NUMBER)
    *
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20010: PLAN is not allowed to CREATE this -
    SALARY.TEST
    ORA-06512: at line 15
    What can be the problem here?

    Thank you!

    user608897 wrote:

    I know that we cannot use in a DDL trigger, but how can this be a DDL trigger.

    As sybrand hinted it often allows to read a manual.

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e16508/srvrside.htm#CNCPT118

    >
    Overview of triggers

    A database trigger is a stored program unit compiled, written in PL/SQL or Java, that Oracle Database ("fire") automatically calls whenever one of the following occurs:

    1. DML instructions on a particular table or view, issued by a user
    The DML statements modify data in the schema objects. For example, inserting and removing lines are DML operations.

    * 2. DDL statements issued by a particular user or any user *.
    DDL statements define schema objects. For example, create a table and add a column are DDL operations.

    3. database events
    User login or closing of session, errors and database startup or a stop are events that can call triggers.
    >

    A DDL trigger is one that runs when the DDL is made as in 2 above.

    When you create the table, you run DDL, someone wrote a trigger that runs when you try to create the table, and in this trigger, they raise a user-defined exception ORA-20010: the user is not authorized to CREATE Table to tell you that you are not authorized to create the table.

  • How to specify the tablespace for a India primary key in create table statement

    How to specify the storage space for a primary key index in a create table statement?
    Does the following statement is true?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE, 
                "IP_ADDRESS" VARCHAR2(32 BYTE), 
                "EQUIPMENT_ID" VARCHAR2(32 BYTE), 
                "PACKET_DT" DATE, 
                "PACKET" VARCHAR2(255 BYTE), 
                "PACKET_FORMAT" VARCHAR2(32 BYTE), 
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP, 
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 )            
                 TABLESPACE "SBM_DATA";   
    Thank you

    Published by: qkc November 9, 2009 13:42

    As orafad noted, you can use the documentation using ESCALATION clause, i.e.

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
     10               )
     11*              TABLESPACE "USERS"
    SQL> /
    
    Table created.
    

    Justin

Maybe you are looking for

  • download PC speed limit

    I have a HP DV7 laptop.  I use Brighthouse internet service.  I have just upograded ti their 60 MB service.  My PC does not seem able to get the nore to 45 MB to download.  Which is the limit for this computer?  Brighthiouse sent a technician with a

  • Calc.exe

    I have a dell desktop computer refurbished with Windows XP Pro installed before I paid for it. Calc.exe was not installed or was somewhere along the way, deleted or renamed/lost. I use the Windows Calculator a bit, and I am trying to find a way to re

  • No sound, I have laptop HP Pavilion dv9700

    I ran the microsoft Windows repair program and he is back with (sound is muted in windows) how the hell I turn it back on?

  • Movie Maker grab and changed all the desktop icons for Movie Maker and all isopening Movie Maker

    I have a big problem, I have Windows 7 and I made a film using still photos on my computer now all binding, Movie Maker says that Movie Maker does not support the selected file type, 3 first films went great, but obviously I hit the wrong key, it cha

  • Missing Apps blackBerry Smartphones icon

    I've looked everywhere and can't find the Apps icon on my Blackberry Curve 8530.  Any suggestions?  Thank you!