当前位置:首页 > 数据库 > Oracle

Oracle数据库创建表空间

--创建表空间

create tablespace new_taspace1 

--表空间关联的数据文件和位置

DATAFILE ‘D:NEWTABLESPACE1.DBF‘ 

--文件初始大小

SIZE 200M
Oracle数据库创建表空间 - 文章图片

--日志文件
Logging
extent management local
segment space management  auto; --以分号结束

--删除表空间把物理文件一并删除
drop tablespace new_taspace  including contents and datafiles

--创建用户
create user orders
identified by 123456
default tablespace new_taspace; --给用户创建默认表空间

--给用户赋予角色
grant connect,resource to orders
grant dba from orders

--撤销用户管理员角色

revoke dba from orders

--添加访问某张表的权限

grant select on tep to orders

 

--创建图书表
create table book(
id number(11) primary key,
bookname varchar2(50) not null,
price number(11,2) not null,
storage number(11) not null
)

Oracle数据库创建表空间

标签:

本文系统来源:http://www.cnblogs.com/Suk1M/p/4523414.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐