sqlplus
登录system
system as sysdba
创建表空间
create tablespace test datafile ‘D:\app\tablespace\test.dbf’ size 500m
创建用户并指定表空间
create user wang identified by 123 default tablespace test
授权
grant connect ,resource,dba to wang
切换用户
connect wang/123
查询所有表空间
select tablespace_name from dba_tablespaces;
select tablespace_name from user_tablespaces;
查询表空间中所有表的名称
select * from dba_all_tables where tablespace_name=‘test’ and owner=‘wang’;
查询系统用户
select * from all_users
查看当前用户权限
select * from session_privs