Undo Tablespaces【每日一译】--2012-10-31

本文介绍 Oracle 数据库中的 UNDO 表空间概念及其管理方法。UNDO 表空间专门用于存储 UNDO 信息,不可存放其他类型的段如表或索引。每个数据库至少包含一个 UNDO 表空间,在自动 UNDO 管理模式下,每个实例会指定一个 UNDO 表空间。文章还详细讲解了如何创建和分配 UNDO 表空间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Undo tablespaces are special tablespaces used solely for storing undo information.
You cannot create any other segment types (for example, tables or indexes) in undo
tablespaces. Each database contains zero or more undo tablespaces. In automatic undo
management mode, each Oracle instance is assigned one (and only one) undo
tablespace. Undo data is managed within an undo tablespace using undo segments

that are automatically created and maintained by Oracle.

UNDO表空间是特殊表空间它使用独特用于存储UNDO信息。你不能创建其它段类型(

比如表或索引)在UNDO表空间。每个表空间包含0个或更多的UNDO表空间。在自动的UNDO

管理模式,每个ORACLE实例指定一个(仅有一个)UNDO表空间。UNDO数据管理通过一个

UNDO表空间使用UNDO段,那些段是自动创建和维护通过ORACLE.


When the first DML operation is run within a transaction, the transaction is bound
(assigned) to an undo segment (and therefore to a transaction table) in the current
undo tablespace. In rare circumstances, if the instance does not have a designated

undo tablespace, the transaction binds to the system undo segment

当第一个DML操作运行在一个事务,事务被限制(指定)到一个UNDO段(并且所以

针对一个事务表)在当前的UNDO表空间。在少有的情况下,如果实例没有一个设计

好的UNDO表空间,事务将绑定到系统UNDO段。

Caution: Do not run any user transactions before creating the first
undo tablespace and taking it online

原因:不要运行任何用户事务在创建第一个UNDO表空间和使它在线之前。

Each undo tablespace is composed of a set of undo files and is locally managed. Like
other types of tablespaces, undo blocks are grouped in extents and the status of each
extent is represented in the bitmap. At any point in time, an extent is either allocated to
(and used by) a transaction table, or it is free.
You can create a bigfile undo tablespace

任何UNDO表空间由多个UNDO文件集合构成并且这些文件是本地管理。像其它类型的

表空间,UNDO块被分组在多个块和每个区的状态在位图中显示。在任意的时间点,一个

区或者分配(被使用)到一个事务表,或者它是空闲的。

你可以创建一个大文件UNDO表空间。

Creation of Undo Tablespaces
A database administrator creates undo tablespaces individually, using the CREATE
UNDO TABLESPACE statement. It can also be created when the database is created,
using the CREATE DATABASE statement. A set of files is assigned to each newly
created undo tablespace. Like regular tablespaces, attributes of undo tablespaces can
be modified with the ALTER TABLESPACE statement and dropped with the DROP
TABLESPACE statement.

创建UNDO表空间

一个DBA可以独立创建UNDO表空间,使用CREATE UNDO TABLESPACE语句。它也可

以在数据库被创建时创建,使用用CREATE DATABASE语句。一个文件集合被指定到每一个

新创建的UNDO表空间。像普通的UNDO表空间,UNDO表空间的属性可以被修改通过ALTER

TABLESPACE语句并且通过DROP TABLESPACE语句删除表空间。

Note: An undo tablespace cannot be dropped if it is being used by
any instance or contains any undo information needed to recover
transactions.

备注:一个UNDO表空间不能被DROP如果它正在被一个实例使用或者包含任何需要还原事务的

信息。

Assignment of Undo Tablespaces
You assign an undo tablespace to an instance in one of two ways:
■ At instance startup. You can specify the undo tablespace in the initialization file or
let the system choose an available undo tablespace.

UNDO表空间指定

你可以指定一个表空间给一个实例使用2种方式:

#实例启动。你可以指定UNDO表空间在初始化文件或者让系统选择一个可用的UNDO表空间。

■ While the instance is running. Use ALTER SYSTEM SET UNDO_TABLESPACE to
replace the active undo tablespace with another undo tablespace. This method is
rarely used.

#当实例正在运行时,使用ALTER SYSTEM SET UNDO_TABLESPACE 去替换活动的UNDO

表空间使用另一个UNDO表空间。这种方法进比较少用的。

You can add more space to an undo tablespace by adding more datafiles to the undo
tablespace with the ALTER TABLESPACE statement.
You can have more than one undo tablespace and switch between them. Use the
Database Resource Manager to establish user quotas for undo tablespaces. You can
specify the retention period for undo information.

你可以添加更多空间给UNDO表空间通过增加更多的数据文件给UNDO表空间使用ALTER TABLESPACE

语句。

你可以有多个UNDO表空间并且切换它们。使用数据库资源管理器去创建用户的配额对于UNDO表空间。

你可以指定UNDO信息的运行时期。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值