TABLESPACE MANAGERMENT
including permanent,undo and temporary tablespace and some notices
1.the creation of general tablespace:
CREATE TABLESPACE tbsctnr1
DATAFILE '/opt/oracle/oradata/balance/ctnr01'
SIZE 10M AUTOEXTEND OFF
LOGGING
ONLINE
FLASHBACK ON
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM. SIZE 128K
SEGMENT SPACE MANAGEMENT AUTO
;
2.the creation of general tablespace with multiple datafiles:
CREATE TABLESPACE tbstest1
DATAFILE
'/opt/oracle/oradata/balance/test1.dbf' SIZE 10M AUTOEXTEND OFF,
'/opt/oracle/oradata/balance/test2.dbf' SIZE 10M AUTOEXTEND OFF
LOGGING
ONLINE
FLASHBACK ON
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL UNIFORM. SIZE 128K
SEGMENT SPACE MANAGEMENT AUTO
;
3.the modification of renaming the filename of the tablespace:
ALTER TABLESPACE tbsctnr1 OFFLINE;
ALTER TABLESPACE tbsctnr1 RENAME DATAFILE '/opt/oracle/oradata/balance/ctnr01' to '/opt/oracle/oradata/balance/ctnr01.dbf';
ALTER TABLESPACE tbsctnr1 ONLINE;
4.the deletion of the tablespace:
DROP TABLESPACE tbstest1 INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;
5.the creation of temporary tablespace(the temporay tablespace can't specify the non-default block size and just can use uniform. size to specify the extent management):
CREATE TEMPORARY TABLESPACE tmptbs
TEMPFILE '/opt/oracle/oradata/balance/tmptbs01.dbf' SIZE 10M AUTOEXTEND OFF
BLOCKSIZE 8192
TABLESPACE GROUP ''
EXTENT MANAGEMENT LOCAL UNIFORM. SIZE 128K
;
5.the creation of undo tablespace(the undo tablespace can't specify the uniform. to extent management):
CREATE UNDO TABLESPACE tmptbs
DATAFILE '/opt/oracle/oradata/balance/tmptbs01.dbf' SIZE 10M AUTOEXTEND OFF
BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
RETENTION NOGUARANTEE
;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13605188/viewspace-609201/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13605188/viewspace-609201/