drop user rs cascade;
DROP TABLESPACE TEST_zs INCLUDING CONTENTS AND DATAFILES;--删除表空间
select * from dba_tablespaces--查看表空间
--查看表空间文件路径
select tablespace_name,file_id,bytes/1024/1024,file_name
from dba_data_files order by file_id;
--查看用户和默认表空间的关系
select username,default_tablespace from dba_users;
--创建表空间
create tablespace test_zs
datafile 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\test_zs.dbf' size 20M
autoextend on next 20M maxsize unlimited logging
extent management local autoallocate
segment space management auto;
commit;
--创建用户
CREATE USER zs
IDENTIFIED BY zs
DEFAULT TABLESPACE test_zs
TEMPORARY TABLESPACE TEMP;
commit;
--分配角色
grant connect,resource to zs;
grant dba to zs;
阅读(486) | 评论(0) | 转发(0) |