关于oracle:解决-ORA65096-invalid-common-user-or-role-name问题

6次阅读

共计 673 个字符,预计需要花费 2 分钟才能阅读完成。

在 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 tff
ERROR 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

以上问题就能够解决了.

正文完
 0