ITPub博客

首页 > Linux操作系统 > Linux操作系统 > tablespace management 表空间管理

tablespace management 表空间管理

原创 Linux操作系统 作者:china_yebin 时间:2009-07-15 11:56:31 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2009-06-11

  • 博文量
    32
  • 访问量
    51850