GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
TEST02 UNLIMITED TABLESPACE NO
SYS@regan1> grant dba to test02;
Grant succeeded.
SYS@regan1> revoke dba from test02;
Revoke succeeded.
SYS@regan1> select * from dba_sys_privs where grantee='TEST02';
no rows selected
7,插入测试
TEST@regan1> insert into test select * from test;
insert into test select * from test
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'TEST'
TEST@regan1> select OWNER,EXTENT_ID,BYTES/1024 from dba_extents where SEGMENT_NAME='IDX_TEST_02';
OWNER EXTENT_ID BYTES/1024
------------------------------ ---------- ----------
TEST02 0 64
TEST02 1 64
TEST02 2 64
TEST02 3 64
TEST02 4 64
TEST02 5 64
TEST02 6 64
TEST02 7 64
TEST02 8 64
9 rows selected.
8,授予配额或权限
上面是授予UNLIMITED TABLESPACE权限,以下使用配额。
SYS@regan1> alter user test02 quota unlimited on test;
User altered.
SYS@regan1> select * from dba_ts_quotas where username='TEST02';
TABLESPACE_NAME USERNAME BYTES MAX_BYTES BLOCKS MAX_BLOCKS DRO
-------------------- ------------------------------ ---------- ---------- ---------- ---------- ---
TEST TEST02 589824 -1 72 -1 NO
9,插入测试
TEST@regan1> insert into test select * from test;
28173 rows created.
TEST@regan1> select OWNER,EXTENT_ID,BYTES/1024 from dba_extents where SEGMENT_NAME='IDX_TEST_02';