ITPub博客

首页 > 数据库 > Oracle > ORA-65048 ORA-00959

ORA-65048 ORA-00959

原创 Oracle 作者:chenoracle 时间:2018-05-14 15:20:13 0 删除 编辑


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",共同学习,共同成长!!!



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29785807/viewspace-2154453/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE、OCMU 用户组成员、Oracle 11g OCM、微信公众号"IT小Chen"

注册时间:2014-08-05

  • 博文量
    853
  • 访问量
    2727979