在oracle执行:create user tff identified by tff 的
时候报错了:ORA-65096: invalid common user or role name
SQL> create user tff identified by tff;create user tff identified by tffERROR at line 1:ORA-65096: invalid common user or role name
报错:ORA-65096: invalid common user or role name(专用用户名或角色名有效).
谬误起因:用户想在PDBORCL中创立tff用户,却未设置会话container到PDB,而在CDB中创立私有用户因无奈通过名称或角色验证出错.
解决办法:
1、查看Oracle 12c的版本
SQL> select * from v$version;select sys_context ('USERENV', 'CON_NAME') from dual;
2、咱们能够通过ALTER SESSION SET CONTAINER 指定其余容器
SQL> alter pluggable database PDB19 open;
4、查看容器
SQL>select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
5、切换容器到PDB19
6、查看以后应用容器
SQL>select sys_context ('USERENV', 'CON_NAME') from dual;
7、创立用户
create user tff identified by tff;grant dba to tff
以上问题就能够解决了.