Oracle建立表空间和用户

--表空间
-- 我这边是在docker的环境运行的, 表空间路径windows自行设置本地路径 改'\opt\oracle' 这个地方 索引空间类似
CREATE TABLESPACE study
DATAFILE '\opt\oracle' size 800M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

--索引表空间
CREATE TABLESPACE sdt_Index
DATAFILE '\opt\index' size 512M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

--2.建用户 cherish 是用户 oracle 是密码
create user cherish identified by oracle
default tablespace study;

--3.赋权
grant connect,resource to cherish;
grant create any sequence to cherish;
grant create any table to cherish;
grant delete any table to cherish;
grant insert any table to cherish;
grant select any table to cherish;
grant unlimited tablespace to cherish;
grant execute any procedure to cherish;
grant update any table to cherish;
grant create any view to cherish;
grant dba to cherish;

posted @ 2021-04-12 15:53  Cherish°  阅读(73)  评论(0编辑  收藏  举报