oracle - 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;
解决方案
表空间'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
推荐阅读
- java - 尝试在 ubuntu 中使用 lombok.jar 时出错
- javascript - Vue(Quasar)谷歌登录按钮问题
- ruby-on-rails - 如何在 ruby on rails 应用程序中添加 dayjs?
- python - 如何在子图中绘制图像
- mysql - 当我尝试创建表时,出现错误
- python - 在 Python/Pytorch 类方法中传递参数
- c# - 是否可以在 CoderPad 中为 C# 设置断点?
- c++ - C ++ 20中的“破坏运算符删除”是什么?
- java - 带有 JSP 的 Spring Boot 应用程序不能作为独立的 jar 工作,但可以在 IntelliJ 中工作
- mybatis - corda 如何将 mybatis 引入我的 cordapp