Oracle学习笔记--ALTER TABLESPACE
2009-05-08 16:53
489 查看
一,前言:
1.要改变sysaux表空间,必须有sysdba权限
2.若有ALTER TABLESPACE权限,可以执行ALTER TABLESPACE操作
3.若只有MANAGE TABLESPACE权限,只能做下述操作:
设置表空间online 和 offline
Begin or end a backup
设置表空间read only or read write
4.若要设置表空间read only,需确认:
tablespace online
tablespace不能包含活动的rollback segments. 所以system表空间不能read only,因为他包含system roll back segment.
Oracle建议先删除rollback segments在设置tablespace read only之前.
二.重要参数说明,在create tablespace中有的参数这里不在重复.
1.Altering Tablespaces的限制
若是undo tablespace, 只能使用ADD DATAFILE, RENAME DATAFILE, RENAME TO (renaming
the tablespace), DATAFILE ... ONLINE, DATAFILE ... OFFLINE, BEGIN BACKUP,
and END BACKUP这些参数.
不能使system表空间read only, temporary和offline.
若是locally managed temporary tablespaces,只能使用add clause.
2.COALESCE
把每个数据文件的临近的free extents合并为一个大的extent
3.SHRINK SPACE Clause
只能用在temporary tablespaces,收缩表空间,可以用Keep clause指定收缩到多大.
4.RENAME Clause
表空间以及其内的数据文件online.
数据库要10g以上.
不能rename the SYSTEM or SYSAUX表空间
5.backup clause
begin backup的限制
不能用于read-only tablespace 或者temporary locally managed tablespace.
若正在backup,不能做如下操作:
使tablespace offline
shut down instance
begin这个表空间的另一个backup
end backup的限制
不能用在read-only表空间
6.ADD Clause
用来往表空间增加datafile or tmpfile
Adding Datafiles and Tempfiles的限制:
不能用于bigfile tablespace.
7.DROP Clause
删除空的datafilehuotmpfile,数据库必须是open的
限制:
文件必须是空的
文件不能是表空间的第一个文件
表空间不能是read only
8.SHRINK TEMPFILE Clause
只用在临时tablespace,作用和shrink clause基本一样.
9.RENAME DATAFILE Clause
数据库open,并且表空间offline
1.要改变sysaux表空间,必须有sysdba权限
2.若有ALTER TABLESPACE权限,可以执行ALTER TABLESPACE操作
3.若只有MANAGE TABLESPACE权限,只能做下述操作:
设置表空间online 和 offline
Begin or end a backup
设置表空间read only or read write
4.若要设置表空间read only,需确认:
tablespace online
tablespace不能包含活动的rollback segments. 所以system表空间不能read only,因为他包含system roll back segment.
Oracle建议先删除rollback segments在设置tablespace read only之前.
二.重要参数说明,在create tablespace中有的参数这里不在重复.
1.Altering Tablespaces的限制
若是undo tablespace, 只能使用ADD DATAFILE, RENAME DATAFILE, RENAME TO (renaming
the tablespace), DATAFILE ... ONLINE, DATAFILE ... OFFLINE, BEGIN BACKUP,
and END BACKUP这些参数.
不能使system表空间read only, temporary和offline.
若是locally managed temporary tablespaces,只能使用add clause.
2.COALESCE
把每个数据文件的临近的free extents合并为一个大的extent
3.SHRINK SPACE Clause
只能用在temporary tablespaces,收缩表空间,可以用Keep clause指定收缩到多大.
4.RENAME Clause
表空间以及其内的数据文件online.
数据库要10g以上.
不能rename the SYSTEM or SYSAUX表空间
5.backup clause
begin backup的限制
不能用于read-only tablespace 或者temporary locally managed tablespace.
若正在backup,不能做如下操作:
使tablespace offline
shut down instance
begin这个表空间的另一个backup
end backup的限制
不能用在read-only表空间
6.ADD Clause
用来往表空间增加datafile or tmpfile
Adding Datafiles and Tempfiles的限制:
不能用于bigfile tablespace.
7.DROP Clause
删除空的datafilehuotmpfile,数据库必须是open的
限制:
文件必须是空的
文件不能是表空间的第一个文件
表空间不能是read only
8.SHRINK TEMPFILE Clause
只用在临时tablespace,作用和shrink clause基本一样.
9.RENAME DATAFILE Clause
数据库open,并且表空间offline
相关文章推荐
- You execute the following command to change the status of the SALES tablespace: SQL> ALTER TABLESPAC
- 【转载】alter table move 和 alter table shrink space的区别
- 四类checkpoint与alter tablespace begin/end backup的关系
- alter table xx move tablespace xx
- alter database datafile offline drop 与 alter tablespace drop datafile 区别
- alter database datafile offline drop 与 alter tablespace drop datafile 区别
- ALTER TABLESPACE DBXX.TSXX BUFFERPOOL BPXX
- alter database datafile offline drop 与 alter tablespace drop datafile 区别
- alter table move跟shrink space的…
- 热备份时 alter database/tablespace begin/end backup 的原因
- ALTER DATABASE 与 ALTER TABLESPACE OFFLINE的区别
- alter table XXX shrink space compact/cascade详解
- 比较Oracle中的alter table t move和alter table t shrink space
- alter database datafile offline drop 与 alter tablespace drop datafile 区别
- alter database datafile offline drop 与 alter tablespace drop datafile 区别
- 77.You executed the following command to perform a backup of the USERS tablespace: SQL> ALTER TABLES
- 测试alter table shrink space compact cascade及学习user_tables相关列的含义
- 187 Examine the following command: SQL> ALTER TABLE booking SHRINK SPACE COMPACT; Which activity is
- 使用alter tablespace create datafile恢复丢失的数据文件
- ALTER DATABASE 与 ALTER TABLESPACE OFFLINE的区别