oracle offline 删除表,Oracle offline 表空间详解

表空间详解

一、Offline的整体效果:offline以后,未完成的事物可以提交或回滚,但不能发起新的事物,也不能进行查询。

二、Offline的语法:

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

三、将表空间offline的几个参数

(1)NORMAL:

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.

用法:Altertablespace users offline;

Altertablespace users online;

(2)TEMPORARY:

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.

用法:Altertablespace users offline TEMPORARY;

Altertablespace 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.

用法:Altertablespace users offline IMMEDIATE;

recovertablespace 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.

用法:Altertablespace users offline FOR RECOVER;

recovertablespace users;

Alter tablespace users online;

总结:

NORMAL:做检查点

TEMPORARY:可以在数据文件损坏的情况下offline tablespace

IMMEDIATE:不做检查点,在归档模式下才可以offline,online时需要recover

FOR RECOVER:在归档模式下才可以offline,在基于时间点的恢复时使用

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值