标题: 插入数据时报错 ORA-01950: no privileges on tablespace 'T1' [打印本页] 作者: jiawang 时间: 2020-4-3 17:40 标题: 插入数据时报错 ORA-01950: no privileges on tablespace 'T1' SQL> create table wangjia(id number,name varchar2(10));
Table created.
SQL> insert into wangjia values (1,'LISA');
insert into wangjia values (1,'LISA')
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'T1'
报错原因:没有分配表空间配额
查看当前连接用户
SQL> show user;
USER is "C##T1"
解决办法:使用sys用户添加用户在表空间上的配额
[oracle@strong ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 3 17:39:47 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter user c##t1 quota unlimited on t1;
User altered.