Trợ giúp

Xin chào!

Cộng đồng này dành cho các chuyên gia và những người đam mê các sản phẩm và dịch vụ của chúng tôi.
Chia sẻ và thảo luận về nội dung tốt nhất và ý tưởng tiếp thị mới, xây dựng hồ sơ chuyên nghiệp của bạn và trở thành một nhà tiếp thị tốt hơn cùng nhau.

0

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

Ảnh đại diện
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


Ảnh đại diện
Huỷ bỏ
1 Trả lời
0
Ảnh đại diện
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;

Ảnh đại diện
Huỷ bỏ