oracle变更表空间,Oracle - 修改表空间 (ALTER TABLESPACE)

ALTER TABLESPACE语句用于修改已存在的表空间或其数据文件。需要ALTER TABLESPACE权限才能执行操作,或者拥有MANAGE TABLESPACE权限进行特定操作。在使表空间变为只读之前,必须满足特定条件,如表空间在线、不包含活动回滚段等。可以使用此语句添加或修改数据文件,以及控制表空间的在线/离线、读写状态等。
摘要由CSDN通过智能技术生成

Use the ALTER TABLESPACE statement to alter an existing tablespace or one or more of its datafiles or tempfiles.

See Also: for information on creating a tablespace

Prerequisites

If you have ALTER TABLESPACE system privilege, you can perform any of this statement's operations. If you have MANAGE TABLESPACE system privilege, you can only perform the following operations:

Take the tablespace online or offline

Begin or end a backup

Make the tablespace read only or read write

Before you can make a tablespace read only, the following conditions must be met:

The tablespace must be online.

The tablespace must not contain any active rollback segments. For this reason, the SYSTEM tablespace can never be made read only, because it contains the SYSTEM

rollback segment. Additionally, because the rollback segments of a

read-only tablespace are not accessible, Oracle recommends that you

drop the rollback segments before you make a tablespace read only.

The

tablespace must not be involved in an open backup, because the end of a

backup updates the header file of all datafiles in the tablespace.

Performing this function in restricted mode may help you meet these restrictions, because only users with RESTRICTED SESSION system privilege can be logged on.

Syntax

::=

filespec: See .

::=

maxsize_clause::=

storage_clause: See .

Keywords and Parameters

tablespace

Specify the name of the tablespace to be altered.

Note: For locally managed temporary tablespaces, the only clause you can specify in this statement in the ADD clause.

datafile / tempfile_clauses

The datafile and tempfile clauses let you add or modify a datafile or tempfile.

ADD DATAFILE | TEMPFILE

Specify ADD to add to the tablespace a datafile or tempfile specified by filespec.

You can add a datafile or tempfile to a locally

managed tablespace that is online or to a dictionary managed tablespace

that is online or offline. Be sure the file is not in use by another

database.See Also:

Note: For locally managed temporary tablespa

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值