Oracle的创建表空间及用户

学习笔记:

1、创建表空间

--创建表空间
create tablespace thepathofgrace
datafile 'c:\thepathofgrace.dbf'
size 100m
autoextend on
next 10m;

注:

 

create tablespace 后面是表空间名称
datafile 'c:\thepathofgrace.dbf'(指定表空间对应的数据文件)
size 100m (指定表空间的初始大小)
autoextend on (自动增长,当表空间存储都占满时,自动增长)
next 10m; (指定一次自动增长的大小)

 

2、删除表空间

--删除表空间
drop tablespace thepathofgrace

3、创建用户

--创建用户
create user root
identified by root
default tablespace thepathofgrace

注:

identified by 后边是用户密码
default tablespace 后边是表空间名称

4、给用户授权

oracle数据库中的常用角色:

connect(连接角色,基本角色)

resource(开发者角色)

dba(超级管理员角色)

 

CONNECT角色:--是授予最终用户的典型权利,最基本的

 

 

grant dba to root

拓展:

 

 

 

 

 谢谢观看!

 

posted @ 2019-12-02 10:17  the_path_of_grace  阅读(277)  评论(0编辑  收藏  举报