• 博客访问: 56517
  • 博文数量: 39
  • 用 户 组: 普通用户
  • 注册时间: 1970-01-01 08:00
个人简介

鏆傛棤浠嬬粛

文章分类

全部博文(39)

文章存档

2009年(1)

2007年(38)

我的朋友

分类: 数据库开发技术

2007-12-10 17:21:09

ALTER TABLESPACE tablespace
{ONLINE
|OFFLINE [NORMAL|TEMPORARY|IMMEDIATE|FOR RECOVER]}
NORMAL和TEMPORARY的区别主要在于,temporary可以在数据文件损坏的情况下offline tablespace
[@more@]
ALTER TABLESPACE tablespace
{ONLINE
|OFFLINE [NORMAL|TEMPORARY|IMMEDIATE|FOR RECOVER]}
NORMAL :flushes all blocks in all data files in the tablespace out of the SGA. This is the default. You need not perform media recovery on this tablespace before bringing it back online.Use the NORMAL clause whenever possible.
TEMPORARY :performs a checkpoint for all online data files in the tablespace only. Any offline files may require media recovery.
IMMEDIATE :does not ensure that tablespace files are available and does not perform a checkpoint. You must perform media recovery on the tablespace before bringing it back online.
FOR RECOVER takes tablespaces offline for tablespace point-in-time recovery.
ALTER TABLESPACE users OFFLINE NORMAL ¦TEMPORARY ¦IMMEDIATE ¦FOR RECOVER
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.

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.

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.

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.
阅读(989) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册