Create tablespace in Oracle

本文介绍了如何使用 SQL 语句创建不同类型的数据表空间,包括永久表空间、临时表空间和撤销表空间,并提供了多个示例说明如何指定数据文件大小、自动扩展等属性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[url]http://www.adp-gmbh.ch/ora/sql/create_tablespace.html[/url]


The create tablespace statement is used to create a tablespace.
[color=green][size=large]Permanent tablespace[/size][/color]
[color=red]create tablespace ts_something
logging
datafile '/dbf1/ts_sth.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;[/color]
[color=red]create tablespace data datafile '/home/oracle/databases/ora10/data.dbf'
size 10M
autoextend on maxsize 200M
extent management local uniform size 64K;[/color]
[color=green][size=large]Temporary tablespace[/size][/color]
[color=red]create temporary tablespace temp_mtr
tempfile '/dbf1/mtr_temp01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;[/color]
Note, a temporary tablespace has tempfiles, not datafiles.
[color=green][size=large]Undo tablespace[/size][/color]
[color=red]create undo tablespace ts_undo
datafile '/dbf/undo.dbf'
size 100M;[/color]
[color=green][size=large]Misc[/size][/color]
More than one datafile can be created with a single create tablespace command:
[color=red]create tablespace ts_sth
datafile 'c:\xx\sth_01.dbf' size 4M autoextend off,
'c:\xx\sth_02.dbf' size 4M autoextend off,
'c:\xx\sth_03.dbf' size 4M autoextend off
logging
extent management local;[/color]
Adding a tablespace to a database is a structural change that requires a backup.

--------------------------------------------------------------------------------
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值