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

ORA-65048 ORA-00959_第1张图片 

解决方案:

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

你可能感兴趣的:(ORA-65048 ORA-00959)