码迷,mamicode.com
首页 > 其他好文 > 详细

ORA-01950: no privileges on tablespace 'USERS'

时间:2019-12-25 16:18:51      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:方案   tle   connect   show   pac   ber   grant   title   权限   

问题描述:对一张新增的表进行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'

标签:方案   tle   connect   show   pac   ber   grant   title   权限   

原文地址:https://www.cnblogs.com/houzhiheng/p/12096784.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!