现在的位置: 首页 > 综合 > 正文

Oracle创建表空间,用户和授权

2018年02月13日 ⁄ 综合 ⁄ 共 546字 ⁄ 字号 评论关闭

--创建临时表空间
create temporary tablespace t_temp
tempfile 'D:\myoracle\t_temp.dbf'--默认大写文件名:t_temp.dbf
size 100M AutoExtend On Next 10M Maxsize 2048M
extent management local
--临时表空间已创建.

--创建表空间
create tablespace t_space
datafile 'D:\myoracle\t_space.dbf'--默认大写文件名:t_space.dbf
size 100M AutoExtend On Next 10M Maxsize 2048M
extent management local
segment space management auto
--表空间已创建.

--为应用创建用户  用户名:user1  密码:pass1
create user user1 identified by pass1
default tablespace t_space--指定存储对象使用的默认空间表 默认是system
temporary tablespace t_temp--保存临时对象所使用的空间表 默认是 system
--上面的俩行,可以写 空间表为user 临时为temp;不写就默认

grant dba to user1;

抱歉!评论已关闭.