Chapter 6: Managing Database Storage Structures

Purpose

In this chapter you will learn how to use Enterprise Manager to explore the structure of your database. In addition, you will learn how to make a number of changes to your database storage structure.

Topics

This chapter discusses the following:

Exploring the Storage Structure of Your Database
Creating a New Tablespace
Modifying a Tablespace
Multiplexing the Redo Log
Managing Undo in your Database

Move your mouse over this icon to show all screenshots. You can also move your mouse over each individual icon to see only the screenshot associated with it.

 

Exploring the Storage Structure of Your Database

Back to Topic List

You can use Enterprise Manager to manage the storage structures in your database. In this section you'll access the pages for different storage structures to become familiar with their contents. In later sections you'll use the pages to manage the storage structure in your database.

 

Follow the steps below to use Enterprise Manager to explore the storage structure of your database:

1.

Click Administration on the Database Home page to access the Administration property page.

Move your mouse over this icon to see the image

 

2.

Click Control Files in the Storage section to access the Control Files page.

Move your mouse over this icon to see the image

The control files and their status is displayed on the Control Files General page. There are two other property pages, in addition to the General page, for viewing control file information. Click Advanced to view additional information about the control file.

Move your mouse over this icon to see the image

The Advanced page details information about the database stored in the control file. Click Record Section to view information stored in the control file.

Move your mouse over this icon to see the image

The Record Section page displays detailed information about the control file record section. Return to the Administration page by clicking the database link at the top of the page.

Move your mouse over this icon to see the image

 

3.

Click Tablespaces on the Administration page to access the Tablespaces property page. The Tablespaces page provides high-level information about tablespace structure and space usage. You can see how much space is allocated for the tablespace and what portion of it is used.

Move your mouse over this icon to see the image

Select the Example tablespace and click View to display more information about the tablespace.

Move your mouse over this icon to see the image

You see more information about the tablespace. Return to the Administration page by clicking the database link at the top of the page.

Move your mouse over this icon to see the image

 

4.

Click Datafiles on the Administration page to access the Datafiles property page. The Datafiles page provides a list of the datafiles that comprise your database.

Move your mouse over this icon to see the image

Select the example01.dbf datafile and click View.

Move your mouse over this icon to see the image

You see more information about the datafile. Return to the Administration page by clicking the database link at the top of the page.

Move your mouse over this icon to see the image

 

5.

Click Redo Log Groups on the Administration page to access the Redo Log Groups property page. The Redo Log Groups page shows the attributes of the redo log groups for your database.

Move your mouse over this icon to see the image

Return to the Administration page by clicking the database link at the top of the page.

 

6.

Click Archive Logs on the Administration page to access the Archive Logs property page. The Archive Logs page shows the attributes of the archived redo log files for your database.

Move your mouse over this icon to see the image

Return to the Administration page by clicking the database link at the top of the page.

 

Back to Topic List

In this section you will learn how to create a new tablespace for your database.

Perform the steps listed below to create the FSDATA tablespace. This tablespace will be used to store the tables of your database. Repeat these steps to create the FSINDEX tablespace which will be used for storage of the indexes in your database.

1.

Click Tablespaces on the Administration page to access the Tablespaces property page.

Move your mouse over this icon to see the image

Click Create.

Move your mouse over this icon to see the image

 

2.

The Create Tablespace page appears. Enter FSDATA in the Name field. Select Locally Managed under the Extent Management heading. Select Permanent under the Type heading. Select Read Write under the Status heading. Click Add in the Datafiles region of the page.

Move your mouse over this icon to see the image

 

3.

The Add Datafile page appears. Enter a file name in the File Name field on the Add Datafiles page. Accept the defaults for the File Directory and File Size or enter new values. Select Automatically extend datafile when full (AUTOEXTEND) and specify an amount in the Increment field by which you want to extend the datafile each time it fills. Click Continue.

Move your mouse over this icon to see the image

 

4.

You are returned to the Create Tablespace General page. Click the Storage tab.

Move your mouse over this icon to see the image

 

5.

The Storage page appears. Accept all of the defaults on the Storage page. Click OK to create your tablespace.

Move your mouse over this icon to see the image

 

6.

You are returned to the Tablespaces page where you receive a confirmation of the creation of the tablespace. You can view your new tablespace in the Results region.

Move your mouse over this icon to see the image

 

7.

Repeat steps 2 through 6 to create the FSINDEX tablespace. This tablespace will be used to store the indexes in your database.

 

Back to Topic List

You can modify a tablespace using Enterprise Manager. You can add additional space to the tablespace by adding datafiles or extending the existing datafiles. In addition you can enable automatic extension so that the tablespace will automatically extend when full. There are a number of other changes you can make including changing space thresholds and changing the tablespace status to offline.


In this example you will change the automatic extension increment for the UNDOTBS1 tablespace and specify an upper limit for the datafile belonging to the tablespace.

Follow the steps below to modify the UNDOTBS1 tablespace:

1.

Click Tablespaces on the Administration page to access the Tablespaces property page. Select UNDOTBS1 and click Edit.

Move your mouse over this icon to see the image

 

2.

The Edit Tablespace page appears. Select the datafile associated with the tablespace and click Edit.

Move your mouse over this icon to see the image

 

3.

The Edit Datafile page appears. Select Automatically extend datafile when full (AUTOEXTEND). Specify 1 MB for the increment value and 60 MB for the maximum file size. Click Continue.

Move your mouse over this icon to see the image

 

4.

The Edit Tablespace page appears. Click Apply.

Move your mouse over this icon to see the image

 

5.

An update message is displayed confirming your change. Click the database link to return to the Administration page.

Move your mouse over this icon to see the image

 

Back to Topic List

You can multiplex your redo log by adding additional members to each redo log group.

Follow the steps below to add a new member to each of your redo log groups:

1.

Click Redo Log Groups in the Storage subsection on the Administration page to access the Redo Log Groups property page.

Move your mouse over this icon to see the image

 

2.

Select group 1 and click Edit, or click the group number link. The Edit Redo Log Group page appears.

Move your mouse over this icon to see the image

 

3.

Click Add in the Redo Log Members section. The Add Redo Log Member page appears.

Move your mouse over this icon to see the image

 

4.

Enter redo01a.log for the Name and enter the file directory. Click Continue.
Note: You can create your new member in the same directory, but it is recommended that you store
members on separate drives. If there is a drive failure, you will still have one member for the log writer to use.

Move your mouse over this icon to see the image

 

5.

The Edit Redo Log Group page is again displayed. Verify your entry and click Apply to add your new member.

Move your mouse over this icon to see the image

 

6.

You receive a confirmation of the addition of a new member to your log group.

Move your mouse over this icon to see the image

 

7.

Return to the Redo Log Groups property page and repeat steps 3 through 7 for each of your log groups using the file naming convention: redo<group number>a.log.

 

 

Back to Topic List

Undo management entails storing the changes of database transactions long enough to accommodate rollback, read consistency, and flashback features. Auto-tuning of the undo retention period is enabled when you create your database. In this section, you will perform the following tasks:

Using the Undo Management Page
Using the Undo Advisor

Using the Undo Management Page

Back to Topic List

You can use the Undo Management page to view undo configuration, including the auto-tuned undo retention period, its low threshold retention period, and the name and size of the undo tablespace. Auto-tuning of undo retention cannot be disabled.

You can access the Undo Management page as follows:

1.

Click Administration on the Database Home page to access the Administration property page.

Move your mouse over this icon to see the image

 

2.

Click Undo Management in the Database Configuration region to access the Undo Management page.

Move your mouse over this icon to see the image

 

3.

The Undo Management page is displayed. Click the database link to return to the Administration page.

Move your mouse over this icon to see the image

 

Using the Undo Advisor

Back to Topic List

The undo tablespace is set to auto-extend by default when you use DBCA to configure your database. If your undo tablespace is not auto-extensible, you may need to extend the tablespace. You can use the undo advisor to obtain advise on the undo tablespace size.

You can access the undo advisor as follows:

1.

Click Administration on the Database Home page to access the Administration property page.

Move your mouse over this icon to see the image

 

2.

Click Undo Management in the Database Configuration region to access the Undo Management page.

Move your mouse over this icon to see the image

 

3.

The Undo Management page is displayed. Click Undo Advisor.

Move your mouse over this icon to see the image

 

4.

The Undo Advisor page is displayed. On the top of the page you can see the current auto-tuned undo retention time and undo tablespace size.

Move your mouse over this icon to see the image

 

5.

Assume that you have determined the duration of your longest running query is 60 minutes. Enter 60 in the New Undo Retention field and choose a time period for analysis from the Analysis Time Period drop-down menu. The page is refreshed based on your input.

Move your mouse over this icon to see the image

 

6.

The tablespace size required to meet your specifications is displayed in the Analysis section.

Move your mouse over this icon to see the image

 

 

Move your mouse over this icon to hide all screenshot