0

I tried to create a user after creating tablespaces but there is an error at line 1, ORA-01031: insufficient privileges.

This is what I wrote and the effect ...

Enter user-name: sys as sysdba
Enter password:
Connected to:

Oracle Database 12c Enterprise Release 12.1.0.1.0

SQL> create user c##ntoi identified by botho123
2    container=all
3    default tablespace perm_ntoi_tbs
4    temporary tablespace temp_ntoi_tbs;

create user c##ntoi identified by botho123
                                   *
ERROR at line 1:
ORA-01031: insufficient privileges
Jeff Holt
  • 2,940
  • 3
  • 22
  • 29
  • Which user are you connected to, while running that CREATE USER statement? – Littlefoot Mar 25 '21 at 12:12
  • I'm connected to sys as sysdba – Korotsoane Ntoi Justice Mar 25 '21 at 13:01
  • Photographs of your computer monitor are about the worst way I can think of to show what you have. It is very easy to _copy_ the _text_ from the session, then paste it (formatted as code) directly into your question. That is orders of magnitude more readable. As to your problem, I'd want proof of who is issuing the command as well as where they are. Issue the same CREATE USER command, _immediately_ followed by a 'show user' and 'show con' commands. Then use copy and paste to show us the result. – EdStevens Mar 25 '21 at 14:12

2 Answers2

0

According to the create user command for the version you're connected to:

To specify the CONTAINER clause, you must be connected to a multitenant container database (CDB). To specify CONTAINER = ALL, the current container must be the root. To specify CONTAINER = CURRENT, the current container must be a pluggable database (PDB).

Maybe your environment is set such that connecting to "sys as sysdba" is connecting to:

  1. a pluggable instead of its container
  2. a current container that is not the root
Jeff Holt
  • 2,940
  • 3
  • 22
  • 29
0

I have created the user by connecting with

SQL> conn c##sys

I got another problem when granting the user

SQL> grant sysdba, connect, create user, create session to c##ntoi;

ERROR at line 1:

ORA-47410: Realm violation for GRANT on CREATE SESSION