首页 > 数据库 > mysql教程 > Oracle表空间和数据文件

Oracle表空间和数据文件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
发布: 2016-06-07 17:26:52
原创
1137 人浏览过

Oracle创建表空间 1.创建普通表空间create tablespace oracle_tablespacedatafile

Oracle创建表空间

1.创建普通表空间
create tablespace oracle_tablespace
datafile '/home/oracle/oradata/orcl/oracle_tablespace.dbf'
size 100m
autoextend on next 10M maxsize 200M
extent management local
uniform size 1m;

2.创建undo表空间
CREATE undo tablespace undo_oracle
datafile '/home/oracle/oradata/orcl/undo_oracle.dbf'
size 50m
extent management local;

3.创建temporary表空间
CREATE temporary tablespace temporary_oracle
tempfile '/home/oracle/oradata/orcl/temporary_oracle.dbf'
size 50m
autoextend on next 10M maxsize 100M
extent management local
uniform size 1m;

 


扩展表空间

1.扩展数据表空间

alter tablespace oracle_tablespace add datafile '/home/oracle/oradata/orcl/oracle_tablespace1.dbf' size 100M;

2.扩展undo表空间

alter tablespace oracle_tablespace add datafile '/home/oracle/oradata/orcl/undo_tablespace1.dbf' size 100M;

3.扩展temporary表空间

alter tablespace oracle_tablespace add tempfile '/home/oracle/oradata/orcl/temporary_tablespace1.dbf' size 100M;


删除表空间

--删除空的表空间,但是不包含物理文件
drop tablespace tablespace_name;
--删除非空表空间,但是不包含物理文件
drop tablespace tablespace_name including contents;
--删除空表空间,包含物理文件
drop tablespace tablespace_name including datafiles;
--删除非空表空间,包含物理文件
drop tablespace tablespace_name including contents and datafiles;
--如果其他表空间中的表有外键等约束关联到了本表空间中的表的字段,,就要加上CASCADE CONSTRAINTS
drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;

linux

来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
上传空间
来自于 1970-01-01 08:00:00
0
0
0
关于命名空间
来自于 1970-01-01 08:00:00
0
0
0
linux - fdisk-l 空间很大 df -h空间很小
来自于 1970-01-01 08:00:00
0
0
0
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板