[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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------