Помощь

Добро пожаловать!

Это сообщество предназначена для профессионалов и энтузиастов наших товаров и услуг.
Поделитесь и обсудите лучший содержание и новые маркетинговые идеи, постройте свой профессиональный профиль и станьте лучшим маркетологом вместе.

0

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

Аватар
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


Аватар
Отменить
1 Ответ
0
Аватар
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;

Аватар
Отменить