ORA-01950: no privileges on tablespace 解决方案

项目场景:

SQL> 
SQL> show user;
USER is "SYS"
SQL> 
SQL> create tablespace teach10 datafile '/u02/oradata/CDB1/pdb1/teach10.dbf' size 10m;

Tablespace created.

SQL> grant connect,resource to teach identified by oracle;

Grant succeeded.

SQL> alter user teach default tablespace teach10;

User altered.

SQL> show con_name;

CON_NAME
------------------------------
PDB1
SQL> create table teach.test as select * from scott.emp;
create table teach.test as select * from scott.emp
                                               *
ERROR at line 1:
ORA-01950: no privileges on tablespace 'TEACH10'

 


问题描述

 跨用户建表时产生 ORA-01950: no privileges on tablespace 'TEACH10'


原因分析:

由于对新建的表空间没有给予一定的表空间配置额度。


解决方案:

对于当前用户进行授权,并给予其默认表空间进行配置额度设定。

SQL> grant create session,create table to teach;

Grant succeeded.

SQL> alter user teach quota 10M on teach10;

User altered.

SQL> create table teach.test as select * from scott.emp;

Table created.

SQL>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值