I have some problem with creating user in Enterprise Oracle Database System. A could'n create user using command like

create user name identified by password;

because of exception:

ORA-65096: invalid common user or role name

So I found solution on Google:

alter session set container=PDBORCL;

and after that - is work. User was created.

But I can't log in to this account. What is wrong? I add all privileges to this account (CREATE SESSION of course too). I got error:

ORA-01017: invalid username/password; login denied.

What the hell is going on?


If you want to create a user that can admin any of the pluggable databases, prefix the username with C##.

For example:

create user c##name identified by password;
| improve this answer | |

Please see the following to understand the issue

enter image description here

So even though you're connected with user SYSTEM to the pdb, when you issue connect without specifying the pdb, it'll try to connect to the container and the user is not defined there.

| improve this answer | |

You could also prefix your script with

alter session set "_ORACLE_SCRIPT"=true;


| improve this answer | |

It's a new feature in 12c - Multitenant architecture:


You tried to create a user in the root container database (CDB) which is intended for administration of one or more pluggable databases (PDB).

| improve this answer | |

You created a user in a pdb. You need to connect to that pdb to be able to connect with the newly created user as the user is only known to that pdb if it is not a common user. To connect to the correct pdb you need to specify the correct service name in the connect string.

| improve this answer | |

Do you need give the grant to create session next the line:

| improve this answer | |
  • I think you mean "You need to grant create session", or something. – Max Vernon Jan 10 '17 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy