oracle创建表空间和用户

使用sys sysdba登录sqlplus

创建表空间
create tablespace histdb1
datafile 'd:\oracle\product\10.2.0\oradata\orcl\histdb2.dbf'
size 200m
autoextend on next 10m maxsize unlimited;

创建用户:
create user histdb3 identified by histdb4
default tablespace histdb1
temporary tablespace temp

指定角色:
grant connect,resource,dba to histdb3

注:
histdb1 为表空间
histdb2 为表空间文件名
histdb3为用户名
histdb4为用户密码

 

删除:
步骤一: 删除user
drop user ×× cascade
说明: 删除了user,只是删除了该user下的schema objects,是不会删除相应的tablespace的。
步骤二: 删除tablespace
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES;

 

posted @ 2017-05-02 13:48  田云  阅读(277)  评论(0编辑  收藏  举报