Legal | Privacy
Chapter 6: Managing Database Storage Structures

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
Reclaiming Space in your 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 Controlfiles in the Storage section to access the Controlfiles page. The control files and their status is displayed on the Controlfiles General page.

Move your mouse over this icon to see the image

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 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.

 

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. Click Create.

Move your mouse over this icon to see the image

 

2.

The Create Tablespaces 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 Create Tablespace: 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 the Thresholds tab.

Move your mouse over this icon to see the image

 

6.

The Thresholds page appears. Accept the defaults or enter new values. Click OK to create your tablespace.

Move your mouse over this icon to see the image

 

7.

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

 

8.

Repeat steps 2 through 7 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.

Move your mouse over this icon to see the image

 

Back to Topic List

You can use the segment advisor to advise on which objects are good candidates for shrink operations. You can then follow recommendations and shrink objects as necessary. You can run the advisor at the tablespace or object level.

In this section, you will perform the following tasks:

Using the Segment Advisor
Shrinking Database Objects

 

Using the Segment Advisor

Back to Topic List

Follow the steps below to invoke the segment advisor at the tablespace level:

1.

Click Advisor Central in the Related Links region on the Database Home page.

Move your mouse over this icon to see the image

 

2.

The Advisor Central page appears. Click Segment Advisor to invoke the segment advisor.

Move your mouse over this icon to see the image

 

3.

The Segment Advisor property page appears. Select Tablespaces and click Continue.

Move your mouse over this icon to see the image

 

4.

The Segment Advisor: Tablespaces page appears. Click Add.

Move your mouse over this icon to see the image

 

5.

The Tablespaces: Add page appears. Select the EXAMPLE tablespace and click OK.

Move your mouse over this icon to see the image

 

6.

The Segment Advisor: Tablespaces property page appears with the EXAMPLE tablespace listed. Click Next.

Move your mouse over this icon to see the image

 

7.

The Segment Advisor: Options page appears. Select Unlimited and click Next.

Move your mouse over this icon to see the image

 

8.

The Segment Advisor: Schedule page appears. Select Standard from the Schedule Type drop-down menu and click Next.

Move your mouse over this icon to see the image

 

9.

The Segment Advisor: Review page appears. Select Submit to submit the job.

Move your mouse over this icon to see the image

 

10.

The Advisor Central page appears listing the advisor related tasks that have run. Select the Segment Advisor task that you submitted and click View Result.

Move your mouse over this icon to see the image

 

11.

The Segment Advisor Task page appears showing the recommendations for your selected tablespace. To implement one or more recommendations, select the recommendation. Follow the steps in the Shrinking Database Objects section to shrink the objects.

Move your mouse over this icon to see the image

 

 

 

Shrinking Database Objects

Back to Topic List

You can shrink objects in the tablespace by performing the following steps:

1.

Select the Shrink Options at the bottom of the page. You can choose to Compact Segments and Release Space which releases freed space to the tablespace or you can Compact Segments only. Click Schedule Implementation to run the shrink operation.

Move your mouse over this icon to see the image

 

2.

The Schedule Implementation page appears. Accept a start time of Immediately and click Submit.

Move your mouse over this icon to see the image

 

3.

The Scheduler Jobs page appears showing the status of the job. You can click Refresh to update the page until the status of the job is Completed. On successful completion, you can navigate back to the Tablespace page and compare the current used space with the previous.

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 on the Administration page to access the Redo Log Groups property page.

Move your mouse over this icon to see the image

 

2.

Select a group 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.

 

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 Oracle Recommendations for Managing Undo
Extending the Undo Tablespace
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 also use this page to set the low threshold retention or to extend your tablespace. This might become necessary when your database transaction rate increases or when you need to create a flashback recovery strategy.

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 Instance region to access the Undo Management page.

Move your mouse over this icon to see the image

 

Using Oracle Recommendations for Managing Undo

Back to Topic List

The current recommendations for your undo configuration are summarized in the Recommendations section of the Undo Management page. You can update the analysis by specifying a past time period for Oracle to analyze system activity 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 Instance region to access the Undo Management page.

Move your mouse over this icon to see the image

 

3.

Enter a time period and click Update Analysis.

Move your mouse over this icon to see the image

 

Extending the Undo Tablespace

Back to Topic List

The Oracle server will automatically extend the undo tablespace when space is needed if the AUTOEXTEND feature is enabled for the tablespace. You might need to manually extend the undo tablespace when the AUTOEXTEND tablespace feature is disabled. You might discover this through proactive planning with the undo advisor. You might also need to extend the undo tablespace when you receive an undo tablespace alert (warning or critical), or when you receive a long query alert or "snapshot too old" error.

You can extend the undo tablespace 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 Instance region to access the Undo Management page.

Move your mouse over this icon to see the image

 

3.

Click Edit Undo Tablespace in the Recommendations section.

Move your mouse over this icon to see the image

 

4.

The Edit Tablespace page appears. Select a datafile and click Edit to extend the tablespace.

Move your mouse over this icon to see the image

 

5.

The Edit Datafile page appears. Enter the new size in the File Size field. Note: In this example, the size was increased to 45 MB. Click Continue.

Move your mouse over this icon to see the image

 

6.

The Edit Tablespace page is redisplayed with your new value. Click Apply.

Move your mouse over this icon to see the image

 

Using the Undo Advisor

Back to Topic List

You can use the undo advisor to advise on the undo tablespace size and the low threshold undo retention setting. The top of the page shows the current auto-tuned undo retention time and 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 Instance region to access the Undo Management page.

Move your mouse over this icon to see the image

 

3.

Click Undo Advisor.

Move your mouse over this icon to see the image

 

4.

The Undo Advisory page is displayed.

Move your mouse over this icon to see the image

 

Move your mouse over this icon to hide all screenshot

 

 

 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy