前提,用戶必須要有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(介質恢復)。
未完待續。。。