ORA-01950: no privileges on tablespace 'USERS'

Posted houzhiheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ORA-01950: no privileges on tablespace 'USERS'相关的知识,希望对你有一定的参考价值。

问题描述:对一张新增的表进行insert操作,提示没有操作权限,简单的记录一下

解决方案:grant resource to username  grant resource to username 时 自动获得了有unlimited tablespace的系统权限

SQL> create table jobs(job_id varchar2(10) primary key,job_title varchar2(35) not null,min_salary number(6),max_salary number(6));

Table created.

SQL> insert into values(‘PRD‘,‘程序员‘,5000,10000);
insert into values(‘PRD‘,‘程序员‘,5000,10000)
*
ERROR at line 1:
ORA-00903: invalid table name


SQL> insert into jobs values(‘PRD‘,‘程序员‘,5000,10000);
insert into jobs values(‘PRD‘,‘程序员‘,5000,10000)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace ‘USERS‘

SQL> show user
USER is "SYS"
SQL>
SQL>
SQL> grant insert on jobs to user01;
grant insert on jobs to user01
*
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> grant insert on user01.jobs to user01;

Grant succeeded.

SQL> conn user01/410526
Connected.
SQL> insert into jobs values(‘PRD‘,‘程序员‘,5000,10000);
insert into jobs values(‘PRD‘,‘程序员‘,5000,10000)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace ‘USERS‘

SQL> grant resource to user01;

Grant succeeded.

SQL> insert into jobs values(‘PRD‘,‘程序员‘,5000,10000);

1 row created.

以上是关于ORA-01950: no privileges on tablespace 'USERS'的主要内容,如果未能解决你的问题,请参考以下文章

ORA-01950: no privileges on tablespace xxxx

ORA-01950: 对表空间 'USERS' 没有权限 [关闭]

ORA-01950:对表空间 'USERS' 无权限 ?????

ORA-01950: 表空间'USERS'中无权限的2种解决办法

HiveSQLException: Error while compiling statement: No privilege 'Create' found for outputs {

Hplsql报错:...HiveSQLExpection:Error while compiling statement:No privilege 'Select' found for