解決 ORA-65096: invalid common user or role name問題

在oracle執行:create user tff identified by tff 的
時候報錯了:ORA-65096: invalid common user or role nameoracle

SQL> create user tff identified by tff;
create user tff identified by tff
ERROR at line 1:
ORA-65096: invalid common user or role name

報錯:ORA-65096: invalid common user or role name(公用用戶名或角色名無效).ide

錯誤緣由:用戶想在PDBORCL中建立tff用戶,卻未設置會話container到PDB,而在CDB中建立公有用戶因沒法經過名稱或角色驗證出錯.spa

解決方法:
一、查看Oracle 12c的版本code

SQL> select * from v$version;
select sys_context ('USERENV', 'CON_NAME') from dual;

image.png

二、咱們能夠經過ALTER SESSION SET CONTAINER 指定其餘容器blog

SQL> alter pluggable database PDB19 open;

image.png
四、查看容器it

SQL>select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

image.png
五、切換容器到PDB19
image.png
六、查看當前使用容器io

SQL>select sys_context ('USERENV', 'CON_NAME') from dual;

image.png
七、建立用戶class

create user tff identified by tff;
grant dba to tff

image.png

以上問題就能夠解決了.容器

相關文章
相關標籤/搜索