Bantuan

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

ERROR at line 1: ORA-65096: invalid common user or role name

Avatar
Admin

When create a user in Oracle 19c,  create user USERNAME identified by tiger;

ERROR at line 1: ORA-65096: invalid common user or role name


Avatar
Discard
1 Jawaban
0
Avatar
Admin
Best Answer

1.  check your database version

SELECT banner FROM v$version WHERE ROWNUM = 1;

2.  Run a command 

SQL> alter session set "_ORACLE_SCRIPT"=true;

SQL> create user USERNAME identified by PASSWORD;




NOTES:
In Oracle 12c and above, we have two types of databases:
Container DataBase (CDB), and
Pluggable DataBase (PDB).

If you want to create an user, you have two possibilities:
You can create a "container user" aka "common user". Common users belong to CBDs as well as to current and future PDBs. It means they can perform operations in Container DBs or Pluggable DBs according to assigned privileges.

create user C#USERNAME identified by PASSWORD;

You can create a "pluggable user" aka "local user".
Local users belong only to a single PDB. These users may be given administrative privileges, but only for that PDB inside which they exist. For that, you should connect to pluggable datable like that:

alter session set container =NAMEOFYOURPLUGGABLEDATABASE;

and there, you can create user like usually:


create user USERNAME identified by PASSWORD;

Avatar
Discard