Using Automatic Memory Management

This tutorial describes how you can use Enterprise Manager to automatically manage memory allocation for your instance.

Approximately 20 minutes

This tutorial covers the following topics:

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

One of the core initiatives undertaken by Oracle Database 10g is to simplify Oracle database administration. As part of that effort, many of the repetitive and manual tasks have been automated. In this section, you proactively manage and automate some of the mundane tasks related to Oracle Instance Memory Configuration. By automating memory configuration, you have more time to deal with real application or business issues that affect your enterprise.

The Memory Advisor is an intelligent expert system within the Oracle database that proactively determines optimal settings for various SGA and PGA components. When automated, the Oracle database automatically adjusts the settings for the various pools and caches according to the requirements of the workload.

Back to Topic List

In order to perform this tutorial, you need to perform the following step:

1.

Perform the Installing Oracle Database 10g on Windows tutorial.

Back to Topic List

In this section, you change the total SGA size. To change the total SGA size, you must make sure that the maximum SGA size is large enough. Perform the following steps:

1.

Open your browser and enter the following URL (Replace <hostname> with your own host name or IP address):

http://<hostname>:1158/em

Enter sys as the username, specify password as oracle, connect as SYSDBA, and then click Login.

Move your mouse over this icon to see the image

 

2.

Scroll down to the bottom of the Database home page and click Advisor Central under Related Links.

Move your mouse over this icon to see the image

 

3.

Click Memory Advisor.

Move your mouse over this icon to see the image

 

4.

Note the values of your Total SGA Size and your Maximum SGA Size, in our example, 276 MB. (You will need them later to reset your SGA values.) Then scroll down to the bottom of the page. Change Maximum SGA Size to 300 MB and click Apply.

Move your mouse over this icon to see the image

 

5.

If the Max SGA Size parameter is changed, the database needs to be restarted. Click Yes to confirm.

Move your mouse over this icon to see the image

 

6.

Specify the host credentials and the database credentials. Click OK.

Host Credentials
Username: oracle
Password: oracle

Database Credentials
Username: sys
Password: oracle
Connect As: SYSDBA

Move your mouse over this icon to see the image

 

7.

Confirm the spfile location and click Yes to restart the database.

Move your mouse over this icon to see the image

 

8.

The database restart operation is in progress. Wait for a few minutes, and then click Refresh.

Move your mouse over this icon to see the image

 

9.

Steps 9a through 9c may not be necessary.

If you click Refresh before the database instance has started up completely, perform the following steps:

a. Click Logout.

Move your mouse over this icon to see the image

b. Click Login.

Move your mouse over this icon to see the image

c. Enter sys as the username, specify oracle as password, connect as SYSDBA. Click Login.

Move your mouse over this icon to see the image

 

10. Scroll down and click Advisor Central under Related Links.

Move your mouse over this icon to see the image

 

11. Click Memory Advisor.

Move your mouse over this icon to see the image

 

12.

Scroll down and click Advice.

Move your mouse over this icon to see the image

 

13.

This graph shows the usage details. Click OK.
Note: The graph displayed can vary depending on the workload.

Move your mouse over this icon to see the image

 

14. Change the Total SGA Size parameter to 290 MB. Click Apply.

Move your mouse over this icon to see the image

 

15.

You see that the allocation for various SGA components has changed automatically.

Move your mouse over this icon to see the image

Move your mouse over this icon to see the image

 

16. Set the Total SGA Size and Maximum SGA Size parameters to the values noted in step 4, for example 276 MB. Click Apply. Then follow the steps (covered earlier in this tutorial) to restart your database.

Move your mouse over this icon to see the image

 

To allocate memory associated with the PGA, perform the following steps:

1.

Click the PGA tab.

Move your mouse over this icon to see the image

 

2.

Click Advice.

Move your mouse over this icon to see the image

 

3.

The PGA Aggregate Target Advice graph shows the frequency in which data is found in cache so that you do not have to access the disk. In this case, it should be noted that the current PGA Aggregate Size is set to approximately 92 MB, and 100% of all the requested services are got from memory. The PGA Aggregate Size implies that (based on current workloads and the number of sessions in the database) no more than 92 MB should be allocated for all PGAs in this database. Click Cancel.
Note: This graph may vary depending on the workload.

Move your mouse over this icon to see the image

 

4.

Click PGA Memory Usage Details.

Move your mouse over this icon to see the image

 

5.

This graph shows the usage details in memory size requests and executions percentages for various PGA memory requests. Click OK.

Move your mouse over this icon to see the image

 

In this tutorial, you learned how to:

Change the Max SGA Size
Change the Total SGA Size
Use the PGA advisor to make sure the memory is allocated appropriately

Back to Topic List

Place the cursor on this icon to hide all screenshots.