当前位置: 代码迷 >> 综合 >> 操作Tablespace 的三种方式offline 、online、read only
  详细解决方案

操作Tablespace 的三种方式offline 、online、read only

热度:38   发布时间:2023-12-22 07:53:26.0

前提,用户必须要有alter  tablespace或者manage tablespace的权限

 

  offline方式

1.       system tablespaceundo tablespacetemporary  tablespace不能offline

2.       alter tablespace  tablespace_name  offline有三种参数:normal(缺省)、temporaryimmediate

normal datafile检查无误后,再做checkpoint,然后再offline。如果tablespace没有datafile,则直接关闭,并且有一个write 错误。

alter tablespace tablespace_name offline normal;  其中normal可以省略。

 

temporary:即使检测到tablespacedatafilewrite error(内存里面与磁盘数据不一致),直接做checkpoint,再offline 所以当把tablespace offline online时,需要media recovery(介质恢复)

 

immediate:不检测datafile也不对其进行checkpoint,直接offline。当把tablespace offline online时,也需要media recovery(介质恢复)。

 

 

未完待续。。。

  相关解决方案