RelationalDBDesign RelationalDBDesign

Table Space Management   «Prev  Next»
Lesson 2 Overview of tablespace management
Objective Describe the purpose of tablespace management.

Extended and restricted rowid

Because you have either taken other courses about Oracle administration or have some on-the-job experience with it, you already understand how tablespaces fit into the Oracle architecture.
This lesson discusses two key concepts in tablespace management. The contents of the
  1. rowid and
  2. the methods of tablespace extent management.
The rowid contains a record location. In legacy Oracle databases, the rowid was formatted in an absolute address that was tied to the database. In Oracle, this format, called the restricted rowid, is kept only for backward compatibility.
An extended rowid is the new Oracle format for rowid. All rows created in an Oracle database use the extended rowid. The extended rowid is a tablespace-relative address for a record, which makes the rowid portable across databases.
The primary purpose for revising the format of the rowid is to enable transportable tablespaces. Transportable tablespaces are covered later in this module.

Creating an Encrypted Tablespace

Once you have created a tablespace master encryption key and have opened the wallet and the database, you can create an encrypted tablespace. When using the create tablespace command, you can specify the encryption algorithm and key length for the encryption. The encrypt keyword in the default storage clause tells Oracle to encrypt the tablespace.

The following listing shows the creation of an encrypted tablespace:
create tablespace ENCR_TSPACE
datafile '/u01/oradata/CC1/secure01.dbf'
size 200m
encryption using 'aes128'
default storage(encrypt);

In this example, the tablespace is encrypted using the AES algorithm, with a key length of 128 bits. The default encryption algorithm is AES128 .
Any table you now create in the ENCR_TSPACE tablespace will be encrypted. Aside from specifying the tablespace, you do not need to modify any of your application code to take advantage of this feature. To see if your tablespaces are encrypted, query the Encrypted column of the DBA_TABLESPACES data dictionary view. You cannot encrypt an existing tablespace. If the objects you need to encrypt are already stored within the database, use the move clause of the alter table command to move them to the encrypted tablespace. If enough space is available, you may be able to use the create table as select command to create a new encrypted table based on an existing unencrypted table.
Regardless of the approach you choose, wallet-based security provides an important tool for securing your data without changing your application code. Additional security features available for Oracle DBAs include encrypted backups and secure files.

Logical rowid

A new type of rowid called the logical rowid is used to track the location of rows in index-organized tables.
Rows in an index-organized table can move to a different physical location when new rows are inserted or old rows are deleted. Therefore, a traditional rowid (containing the physical location of the record) does not serve the purpose intended for a rowid (a permanent and direct locator of the row). The logical rowid solves this problem by storing information about location that includes primary key information rather than physical block information.
To use this kind of rowid in your PL/SQL code, use the UROWID data type.

Changes in Tablespace extent Management

The biggest change in the sizing of a tablespace is the capability to choose between two methods of tablespace sizing and extent management:
  1. The traditional method, called dictionary managed, which uses the database dictionary to track data blocks and allocate extents. This is the default method.
  2. The new method, called locally managed, which uses the tablespace itself to track data blocks and allocate extents. This method can be more efficient because it reduces calls to the database dictionary.
The new method is featured in the next lesson.
In the next lesson you will find out all about locally managed tablespaces and how to create them.