SQL> select * from session_privs;
PRIVILEGE
----------------------------------------
CREATE SESSION
CREATE TABLE
SELECT ANY TABLE
CREATE VIEW
SQL> create table cat(i number); --有建表的权限但是没有使用表空间的权限
create table cat(i number)
ORA-01950: 对表空间 'USERS' 无权限
SQL> grant unlimited tablespace to cat;
Grant succeeded
system==>SQL> create table cat(i number);
Table created
SQL> revoke unlimited tablespace from cat;
SQL> alter user cat quota unlimited on users; -- 对表空间users 有无限制的使用权限,或者在创建用户的时候指定默认的大小
User altered
SQL> alter user cat quota 10M on users; -- 对表空间users 有10M的使用权限
User altered
SQL> CONN CAT/MIAOMIAO@ORCL46
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as CAT
SQL> create table b(i int);
Table created
SQL>