前提,用户必须要有alter tablespace或者manage tablespace的权限
一 offline方式
1. system tablespace、undo tablespace、temporary tablespace不能offline
2. alter tablespace tablespace_name offline有三种参数:normal(缺省)、temporary、immediate
normal: 需datafile检查无误后,再做checkpoint,然后再offline。如果tablespace没有datafile,则直接关闭,并且有一个write 错误。
alter tablespace tablespace_name offline normal; 其中normal可以省略。
temporary:即使检测到tablespace的datafile有write error(内存里面与磁盘数据不一致),直接做checkpoint,再offline。 所以当把tablespace 从offline到 online时,需要media recovery(介质恢复)
immediate:不检测datafile也不对其进行checkpoint,直接offline。当把tablespace 从offline到 online时,也需要media recovery(介质恢复)。
未完待续。。。