conn sys as sysdba;
create user test identified by test;
grant create session to test;
grant create table to test; 这个时候还没有使用表空间的权限,还不可以建表
grant unlimited tablespace to test;
conn test/test;
create table test (sno number);
create table scott.test(id int);
conn sys as sysdba;
grant create any table to test;
conn test/test;
create table scott.test(id int);
conn scott/tiger;
select * from tab;
conn sys as sysdba;
select * from dba_sys_privs d where d.grantee='TEST'; 查看test用户的权限
conn sys as sysdba;
drop user test2 cascade;
drop user test3 cascade;
create user test2 identified by test2;
create user test3 identified by test3;
grant create session to test2 with admin option; 后面选项的意思是可以把创建会话的权限继续传递下去。
conn test2/test2;
grant create session to test3;
conn test3/test3;
conn sys as sysdba;
revoke create session from test2;
conn test2/test2; 连接不上
conn test3/test3; 可以连接上