ORA-65048 ORA-00959
数据库版本:
Oracle 12.2.0.1.0
问题:
CDB数据库内,创建用户并指定默认表空间,报错如下:
ORA-65048: error encountered when processing the current DDL statement in
pluggable database ORCLPDB
ORA-00959: tablespace 'CHENJCH_TBS' does not exist
问题原因:
解决方案:
在其他PDB内,也创建同名的表空间;
问题重现如下:
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> create tablespace chenjch_tbs datafile '/u01/app/oracle/oradata/orcl/chenjch_tbs01.dbf' size 10M autoextend on maxsize 1G;
Tablespace created.
SQL> create user c##chenjch identified by a default tablespace chenjch_tbs;
create user c##chenjch identified by a default tablespace chenjch_tbs
*
ERROR at line 1:
ORA-65048: error encountered when processing the current DDL statement in
pluggable database ORCLPDB
ORA-00959: tablespace 'CHENJCH_TBS' does not exist
SQL> select tablespace_name,status,contents from user_tablespaces;
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------------------
SYSTEM ONLINE PERMANENT
SYSAUX ONLINE PERMANENT
UNDOTBS1 ONLINE UNDO
TEMP ONLINE TEMPORARY
USERS ONLINE PERMANENT
CHENJCH_TBS ONLINE PERMANENT
6 rows selected.
SQL> alter session set container=orclpdb;
Session altered.
SQL> create tablespace chenjch_tbs datafile '/u01/app/oracle/oradata/orcl/orclpdb/chenjch_tbs01.dbf' size 10M autoextend on maxsize 1G;
Tablespace created.
SQL> alter session set container=CDB$ROOT;
Session altered.
SQL> create user c##chenjch identified by a default tablespace chenjch_tbs;
User created.
SQL> grant connect,resource,dba to c##chenjch;
Grant succeeded.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29785807/viewspace-2154453/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29785807/viewspace-2154453/
在Oracle 12.2.0.1.0数据库中,当尝试在CDB$ROOT创建用户并指定不存在于PDB内的默认表空间时,会遇到ORA-65048和ORA-00959错误。解决方法是在每个PDB内创建相同名称的表空间。本文详细介绍了问题的出现和解决过程。

4036

被折叠的 条评论
为什么被折叠?



