sql - How do I create a user that can create users in Oracle 12c? -


i have created user, granted privileges can see in sql developer except sysdba , logged in new user, still cannot create other users.

here have done far:

  1. login local sysdba;

  2. run:

    create user usera identified "pwdpwd123" default tablespace tbs1 temporary tablespace temp profile default account unlock; 
  3. grant privileges , roles can see in sql developer usera;

  4. login usera;

  5. run:

     create user userb identified "pwd321" default tablespace tbs2  temporary tablespace temp profile default account unlock; 

and ora-01031 error. what's wrong? many help!

you need grant create user system priviege user.

grant create user username; 

you can grant alter user , drop user system privileges user.

see documentation: https://docs.oracle.com/database/121/sqlrf/statements_9013.htm#i2077938

system privilege name: create user

create users. privilege allows creator to:

assign quotas on tablespace. set default , temporary tablespaces. assign profile part of create user statement.


edit - practical example


c:\>sqlplus system sysdba  sql*plus: release 12.1.0.2.0 production on sat jan 16 15:16:52 2016  copyright (c) 1982, 2014, oracle.  rights reserved.  enter password:  connected to: oracle database 12c enterprise edition release 12.1.0.2.0 - 64bit production partitioning, olap, advanced analytics , real application testing options  sql> create user test123 identified test;  user created.  sql> grant connect test123;  grant succeeded.  sql> grant create user test123;  grant succeeded.  sql> connect test123 enter password: connected. sql> create user alamakota1 identified alamakota;  user created.  sql> select user dual;  user ------------------------------ test123  sql> 

the last command select user dual shows, current (logged) user user123


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -