ORA-65048 ORA-00959


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

 

问题原因:

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/CREATE-USER.html#GUID-F0246961-558F-480B-AC0F-14B50134621C

 

解决方案:

在其他 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.

  欢迎关注我的微信公众号"IT小Chen",共同学习,共同成长!!!



请使用浏览器的分享功能分享到微信等