解决 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

以上问题就能够解决了.容器

相关文章
相关标签/搜索