mysql数据库熟悉表空间数据文件_Oracle表空间和数据文件

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;

logo.gif

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值