Oracle 12c create user

oracleoracle-12c

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?

Best Answer

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;