Professional Documents
Culture Documents
Oracle8i has a new feature for Oracle DBAs, which allows the database to automatically manage the space allocation for the database segments and extents. This paper will explain what this new functionality means to the DBA, why it is important to use this feature, when to use it, and how to integrate it into your database schema.
Space is locally managed within the tablespace's data files. This is accomplished by using an internal bitmap within the tablespace to manage the free and used space within the tablespace. Each bit represents one or more blocks. Bits are set or cleared to indicate whether each extent is allocated or free. The FET$ and UET$ tables are not used for locally-managed tablespaces.
AUTOALLOCATE
Oracle will calculate the appropriate INITIAL and NEXT sizes for the tablespace's extents (in units of 64K, 1M, 16M, or 64M, as determined by the requested object size). The goal is to best utilize the space, while simplifying the management of the extents. Each bit in the tablespace's bitmap represents a 64K extent, regardless of the calculated size. (This is the default if neither AUTOALLOCATE nor UNIFORM is specified).
UNIFORM SIZE
This allows you to specify a constant extent size of n bytes, regardless of what is specified by the INITIAL and NEXT clauses of the objects to be created in the tablespace. If you do not specify the size clause, it defaults to 1 meg). Each bit in the tablespace's bitmap represents an extent of the specified size. Note that tablespaces using the old dictionary based space management can coexist with ones using the new locally managed space management functionality.
Having the space managed within the temporary tablespace effectively isolates the temporary tablespace operations from the rest of the database. The TEMPFILE clause will cause the temporary tablespace to be recorded only in the control file. Since temporary segments will not be stored in the data dictionary, no redo operations need be generated, in order to protect against data dictionary transaction failure.
DBA_TABLESPACES New columns (EXTENT_MANAGEMENT, ALLOCATION_TYPE) which indicates the extent allocation type (local or dictionary managed) and allocation method (automatic or uniform, if locally-managed) DBMS_SPACE_ADMIN This package is created by the $ORACLE_HOME/rdbms/admin/dbmsspace.sql script. This package can be used by the DBA to check for bitmap corruption and rebuild the bitmaps. It also can be used to migrate from locally-managed tablespaces back to the pre-Oracle8.1 dictionary based space management.
NEW PACKAGES
SUMMARY
The new locally-managed tablespace functionality within Oracle frees the DBA from having to frequently manage the size and number of extents within each tablespace, as well as reacting to fragmentation concerns. It also enables the easy implementation and usage of transportable and read-only tablespaces. Oracle's internal space management routines have been simplified, reducing the number of recursive SQL, rollback, redo, and latch contention that is generated, thereby increasing database performance.
BIBLIOGRAPHY
Oracle8i Concepts Oracle8i SQL Reference Oracle8i Administrators Guide Oracle8i Supplied Packages Reference
BIOGRAPHY
Brian Lomasky is a principal with DBA Solutions, Inc., and is a nationally-certified Oracle DBA. He specializes in Oracle8 and Oracle7 Database Administration and Unix/OpenVMS/WinNT operating system tuning, troubleshooting, configuration, backup and recovery, and database auditing. He has presented numerous sessions at the International Oracle User Group and Oracle Openworld national conferences, as well as the Northeast Oracle Users Group. Brian Lomasky is the author of the best-selling "Oracle Scripts" book, published by O'Reilly & Associates, Inc. Copyright 1999 by DBA Solutions, Inc., 86 Lancaster Rd, Arlington, MA 02476. (781) 648-0788