首页 > 解决方案 > ORA-00959: 命令提示符中不存在表空间 'EXAMPLE'

问题描述

SQL> create user alois identified by alois

  2  default tablespace example password expire;

create user alois identified by alois

*
ERROR at line 1:

ORA-00959: tablespace 'EXAMPLE' does not exist

下一步我应该怎么做?

下面的下一步是这样的:

create user alois identified by alois

default tablespace example password expire;

create user afra identified by oracle

default tablespace example quota unlimited on example;

create user anja identified by oracle;

标签: oracle

解决方案


表空间'EXAMPLE'不存在。可以更改用户创建命令并使用现有表空间。USERS 表空间几乎总是被创建。

create user alois identified by alois

default tablespace USERS password expire;

create user afra identified by oracle

default tablespace USERS quota unlimited on example;

create user anja identified by oracle;

检查表空间

select FILE_NAME,FILE_ID, TABLESPACE_NAME  from dba_data_files

/u01/oradata/DEV/system01.dbf       1   SYSTEM
/u01/oradata/DEV/sysaux01.dbf       3   SYSAUX
/u01/oradata/DEV/undotbs01.dbf      4   UNDOTBS1
/u01/oradata/DEV/users01.dbf        7   USERS
/u01/oradata/DEV/users_ind01.dbf    5   USERS_IND

 select a.tablespace_name , 
        round(a.used_space*8192/(1024*1024*1024),2) as USED_GB, 
        round(a.tablespace_size*8192/(1024*1024*1024),2) as  MAX_SIZE_GB, 
        round(a.used_percent ,2) as USED_PERCENT 
   from dba_tablespace_usage_metrics a


TABLESPACE_NAME  USED_GB  MAX_SIZE_GB  USED_PERCENT       
-------------- ------ -------------- ---------
SYSAUX        6,9         32        21,58
SYSTEM        1,11        32        3,48
TEMP          0           32        0,01
UNDOTBS1      0,04        32        0,14
USERS         23,06       32        72,07
USERS_IND     11,04       32        34,49

推荐阅读