一、表空间
--创建表空间(表空间名:UUMS):
create tablespace "UUMS" datafile 'D:\ProgramFiles\dmdbms\data\MyData\UUMS.dbf' size 128 autoextend on maxsize 16777215 cache = NORMAL;
--删除表空间:
drop tablespace "UUMS";
二、用户
--创建用户(用户名:UUMS,密码:uums123456):
create user "UUMS" identified by "uums123456" limit failed_login_attemps 3, password_life_time 7, password_lock_time 1, password_grace_time 10 default tablespace "UUMS";
--删除用户(用户名:UUMS):
drop user "UUMS";
--授权用户(用户名:UUMS,授权角色:DBA、PUBLIC、RESOURCE):
grant "DBA","PUBLIC","RESOURCE" to "UUMS" with admin option;
三、查询
--查看表空间:
select * from v$tablespace;
--查看大表空间:
select * from v$huge_tablespace;
--查询表,当前用户拥有的表:
select table_name from user_tables;
--查询表,所有用户的表:
select table_name from all_tables;
--查询表,包括系统表:
select table_name from dba_tables;
--查询表:
select table_name from dba_tables where owner='用户名';