- 最后登录
- 2014-1-27
- 在线时间
- 37 小时
- 威望
- 45
- 金钱
- 456
- 注册时间
- 2012-5-4
- 阅读权限
- 10
- 帖子
- 45
- 精华
- 1
- 积分
- 45
- UID
- 403
|
1#
发表于 2012-6-6 18:44:46
|
查看: 8943 |
回复: 12
oracle 11.2.0.1.0
创建用户aaa,给其connect和resource角色,但回收unlimited tablespace权限:
SQL> create user aaa identified by aaa default tablespace users;
User created.
SQL> grant connect,resource to aaa;
Grant succeeded.
SQL> revoke unlimited tablespace from aaa;
Revoke succeeded.
SQL> select * from role_sys_privs where role='RESOURCE';
ROLE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
RESOURCE CREATE SEQUENCE NO
RESOURCE CREATE TRIGGER NO
RESOURCE CREATE CLUSTER NO
RESOURCE CREATE PROCEDURE NO
RESOURCE CREATE TYPE NO
RESOURCE CREATE OPERATOR NO
RESOURCE CREATE TABLE NO
RESOURCE CREATE INDEXTYPE NO
8 rows selected.
SQL> alter user aaa quota unlimited on users;
User altered.
现在的问题是:aaa在任何表空间都有创建表的权限
[oracle@master /]$ sqlplus aaa
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 6 18:38:25 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> create table test1(id int) tablespace users;
Table created.
SQL> create table test2 (id int) tablespace system;
Table created.
SQL> create table test3(id int) tablespace zaodian;
Table created.
表test1可以正常插入数据,test2和test3都无法插入数据,这是正常的:
SQL> insert into test1 values(1);
1 row created.
SQL> insert into test2 values(1);
insert into test2 values(1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SYSTEM'
SQL> insert into test3 values(1);
insert into test3 values(1)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'ZAODIAN'
请问,为什么用户aaa可以在system,zaodian表空间上有创建表的权限? 谢谢! |
|