创建表空间

来源:互联网 发布:淘宝装修代码在线 编辑:程序博客网 时间:2024/06/10 05:37

--sys登陆


--表空间

CREATE TABLESPACE pms
DATAFILE 'D:\oracle\product_2\tablespace\pms' size 100M
         EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; 
--索引表空间
CREATE TABLESPACE pms_Index
DATAFILE 'D:\oracle\product_2\tablespace\pms_index' size 100M         
         EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;     


--2.建用户
create user pms identified by pms 
default tablespace pms;
 
--3.赋权
grant connect,resource to pms;
grant create any sequence to pms;
grant create any table to pms;
grant delete any table to pms;
grant insert any table to pms;
grant select any table to pms;
grant unlimited tablespace to pms;
grant execute any procedure to pms;
grant update any table to pms;

grant create any view to pms;


--删除表空间

drop tablespace dews including contents and datafiles

--删除用户

drop user dews cascade

0 0
原创粉丝点击