Oracle offline 表空間詳解

 Oracle offline 表空間詳解ide

1、Offline的總體效果:offline之後,未完成的事物能夠提交或回滾,但不能發起新的事物,也不能進行查詢。post

2、Offline的語法:ui

ALTER TABLESPACE tablespace {ONLINE|OFFLINE [NORMAL|TEMPORARY|IMMEDIATE|FOR RECOVER]}spa

 

3、將表空間offline的幾個參數.net

 

1NORMAL orm

A tablespace can be taken offline normally if no error conditions exist for any of the datafiles of the tablespace. No datafile in the tablespace can be currently offline as the result of a write error. When OFFLINE NORMAL is specified, Oracle takes a checkpoint for all datafiles of the tablespace as it takes them offline. NORMAL is the default.ci

用法:Alter tablespace users offline;get

Alter tablespace users online;it

(2)TEMPORARY io

 A tablespace can be taken offline temporarily, even if there are error conditions for one or more files of the tablespace. When OFFLINE TEMPORARY is specified, Oracle takes offline the datafiles that are not already offline, checkpointing them as it does so.

 If no files are offline, but you use the temporary option, media recovery is not required to bring the tablespace back online. However, if one or more files of the tablespace are offline because of write errors, and you take the tablespace offline temporarily, the tablespace requires recovery before you can bring it back online.

用法:Alter tablespace users offline TEMPORARY;

Alter tablespace users online;

 

(3)IMMEDIATE 

A tablespace can be taken offline immediately, without Oracle taking a checkpoint on any of the datafiles. When you specify OFFLINE IMMEDIATE, media recovery for the tablespace is required before the tablespace can be brought online. You cannot take a tablespace offline immediately if the database is running in NOARCHIVELOG mode.

用法:Alter tablespace users offline IMMEDIATE;

recover  tablespace users;
Alter tablespace users online;

(4)FOR RECOVER :
Takes the database tablespaces in the recovery set offline for tablespace point-in-time recovery. For additional information, see Oracle9i User-Managed Backup and Recovery Guide.

用法:Alter tablespace users offline FOR RECOVER;

recover  tablespace users;
Alter tablespace users online;

    

總結:

NORMAL :作檢查點

TEMPORARY:能夠在數據文件損壞的狀況下offline tablespace

IMMEDIATE:不作檢查點,在歸檔模式下才能夠offlineonline時須要recover

FOR RECOVER:在歸檔模式下才能夠offline,在基於時間點的恢復時使用

相關文章
相關標籤/搜索