Which two statements are true regarding transactions in an Oracle database? (Choose two.)
A.
Multiple transactions can use the same undo segment.
B.
A transaction is assigned an undo segment when it is started.
C.
More than one transaction cannot share the same extent in the undo tablespace.
D.
The transactions use system undo segment to store undo data if all the segments in the undo
tablespace are used.
Explanation:
SegmentsThe level of logical database storage above an extent is called a segment. A segment is a set of
extents that are allocated for a certain logical structure. Different types of segments include:
Data segments:Each nonclustered. non-index-organized table has a data segment, with the
exception of external tables, global temporary tables, and partitioned tables in which each table
has one or more segments. All of the table’s data is stored in the extents of its data segment. For
a partitioned table, each partition has a data segment. Each cluster has a data segment. The data
of every table in the cluster is stored in the cluster’s data segment.
Index segments:Each index has an index segment that stores all of its data. For a partitioned
index, each partition has an index segment.
Undo segments:One UNDO tablespace is created for each database instance. This tablespace
contains numerous undo segments to temporarily store undo information. The information in an
undo segment is used to generate read-consistent database information and. dining database
recovery, to roll back uncommitted transactions for users.
Temporary segments:Temporary segments are created by the Oracle database when a SQL
statement needs a temporary work area to complete execution. When the statement finishes
execution, the temporary segment’s extents are returned to the instance for future use. Specify
either a default temporary tablespace for every user, or a default temporary tablespace that is
used database-wide.
Transactions and Undo Data
When a transaction starts, it is assigned to an undo segment. Throughout the life of the
transaction, when data is changed, the original (before the change) values are copied into the
undo segment. You can see which transactions are assigned to which undo segments by checking
the V$TRANSACTION dynamic performance view.
Undo segments are specialized segments that are automatically created by the instance as
needed to support transactions. Like all segments, undo segments are made up of extents, which,
in turn, consist of data blocks. Undo segments automatically grow and shrink as needed, acting as
a circular storage buffer for their assigned transactions.
Transactions fill extents in their undo segments until a transaction is completed or all space is
consumed. If an extent fills up and more space is needed, the transaction acquires that space
from the next extent in the segment. After all extents have been consumed, the transaction either
wraps around back into the first extent or requests a new extent to be allocated to the undo
segment.