• Aucun résultat trouvé

Rollback Segments

Dans le document Oracle® Database 2 Day DBA 10g (Page 70-73)

In earlier releases of the Oracle database, rollback segments were database structures used to track undo information for the database. Now, Oracle’s preferred way of managing undo is with the undo tablespace. For more information, see"Managing Undo for Your Database" in this chapter.

ClickRollback Segments. You see the attributes of the system rollback segment. The system rollback segment is self managing.

Tablespaces

A database consists of one or more tablespaces. A tablespace is a logical structure, or container, created by and known only to the Oracle database server in which database objects are stored. A tablespace consists of one or more datafiles or tempfiles.

There are various types of tablespaces, including undo tablespaces, temporary tablespaces, and permanent tablespaces.

A database running in automatic undo management mode transparently creates and manages undo segments. You can create an undo tablespace and determine the maximum retention time for undo data kept in that tablespace.

Temporary tablespaces improve the concurrence of multiple sort operations, reduce their overhead, or avoid Oracle space management operations altogether. Temporary tablespaces are the most efficient tablespaces for disk sorts. Space management (extent allocation and deallocation) is locally managed.

After temporary tablespaces, tablespaces of typeTEMPORARY are the next best tablespaces to use for sort operations. Space management is dictionary managed.

Permanent tablespaces (which are not of typeTEMPORARY) are least efficient for performance of disk sorts.

Temporary and permanent tablespaces can be assigned at the user level. You can create a default temporary tablespace at database creation time. This tablespace is used as the default temporary tablespace for users who are not otherwise assigned a

temporary tablespace.

Tablespaces Page

ClickTablespaces. The Tablespaces page provides high level information about tablespace structure and space usage. You can see how much space is allocated for the

See Also: Oracle Database Administrator's Guide

Exploring the Storage Structure of Your Database

Managing Database Storage Structures 6-5 tablespace and what portion of it is used. Select a tablespace and clickView to drill down to see the underlying datafile attributes.

Some Tablespaces in the Database

Table 6–1 provides a description some of the tablespaces included in the database.

Table 6–1 Tablespaces and Descriptions

Tablespace Description

SYSAUX This is an auxiliary tablespace to theSYSTEM tablespace.

Some components and products that prior to Oracle Database 10g used theSYSTEM tablespace or their own tablespaces now use the SYSAUX tablespace. This reduces the load on theSYSTEM

tablespace and reduces maintenance because there are fewer tablespaces to monitor and maintain. Every Oracle Database 10g or higher level database must have aSYSAUX tablespace.

Components that use this as their default tablespace during installation include Automatic Workload Repository, Oracle Streams, Oracle Text, and Enterprise Manager Repository. For more information, seeOracle Database Administrator's Guide

SYSTEM TheSYSTEM tablespace is always created at database creation.

Oracle uses it to manage the database. It contains the data dictionary, which is the central set of tables and views used as a read-only reference describing a particular database. It also contains various tables and views that contain administrative information about the database. These are all contained in theSYS schema, and can only be accessed by userSYS, or other

administrative users with the required privilege.

TEMP This tablespace stores temporary data generated when processing SQL statements. It would, for example, be used for sort work space. Every database should have a temporary tablespace that is assigned to users as their temporary tablespace. In the

preconfigured database, theTEMP tablespace is specified as the default temporary tablespace. This means that if no temporary tablespace is specified when the user account is created, then Oracle assigns this tablespace to the user.

UNDOTBS1 This is the undo tablespace used by the database server to store undo information. See"Managing Undo for Your Database" to understand Oracle’s use of the undo tablespace. Every database must have an undo tablespace that can be created at database creation.

EXAMPLE This tablespace contains the sample schemas that Oracle includes with the database. The sample schemas provide a common platform for examples. Oracle documentation and educational materials contain examples based on the sample schemas.

Exploring the Storage Structure of Your Database

Temporary Tablespace Groups

Temporary tablespace groups lets users consume temporary space from multiple tablespaces. Using a tablespace group, rather than a single temporary tablespace, can alleviate problems caused when one tablespace is inadequate to hold the results of a sort, particularly on a table that has many partitions. A tablespace group enables parallel execution servers in a single parallel operation to use multiple temporary tablespaces.

A tablespace group name can appear where a tablespace name would appear when assigning a default temporary tablespace for the database or assigning a temporary tablespace for a user.

Click theTemporary Tablespace Groups link. You see the temporary tablespace groups that are defined for your database. Initially, there are none.

Datafiles

Datafiles are the operating system files that hold the data within the database. The data is written to these files in an Oracle proprietary format that cannot be read by programs other than the database server. Tempfiles are a special class of datafiles that are associated only with temporary tablespaces.

Datafiles can be broken down into the following components:

Segments and extents

A segment contains a specific type of database object. For example, tables are stored in data segments, and indexes are stored in index segments.

An extent is a contiguous set of data blocks (defined next) within a segment.

Oracle initially allocates an extent of a specified size for a segment, but if that extent fills, then more extents can be allocated

Data block

Data blocks, also called database blocks, are the smallest unit of I/O to database storage. An extent consists of several contiguous data blocks. The default database block size is specified by a DBA at database creation or defaulted by Oracle.

After the database has been created, it is not possible to change the default block size without re-creating the database. However, it is possible to create tablespace with a block size different than the default block size. For details on how to create USERS This tablespace is used to store permanent user objects and data.

Like theTEMP tablespace, every database should have a tablespace for permanent user data that is assigned to users.

Otherwise, their objects will be created in theSYSTEM tablespace, and this is not good practice. In the preconfigured database, USERS is assigned the default tablespace, and space for all objects created by non-system users comes from this tablespace. For system users, the default permanent tablespace remainsSYSTEM.

See Also: Oracle Database Administrator's Guide for details on using tablespace groups

Table 6–1 (Cont.) Tablespaces and Descriptions

Tablespace Description

Common DBA Tasks for Managing Database Storage

Managing Database Storage Structures 6-7 tablespaces with nondefault (or non-standard) block size, seeOracle Database Administrator's Guide.

ClickDatafiles. Your database datafiles are displayed. Select a datafile and clickView to see more attributes for the datafile, or select a tablespace link to see the attributes of the owning tablespace.

Dans le document Oracle® Database 2 Day DBA 10g (Page 70-73)

Documents relatifs