This tutorial illustrates how to create a disk group with Enterprise Manager Database Control, and how Automatic Storage Management (ASM) rebalances disks when disk volumes are added to or removed from disk groups.
Approximately 20 minutes
This tutorial covers the following topics:
| Overview | ||
| Scenario | ||
| Prerequisites | ||
| Viewing a Disk Group with Enterprise Manager | ||
| Removing a Disk | ||
| Cleanup | ||
| Summary | ||
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.
A major part of the database performance equation is disk striping. This often requires many disks in production, and usually entails a lot of administration on the part of the DBA or the system administrator. Making disks available and then unavailable are common activities associated with that administration, and thus, having the Oracle instance react favorably to those changes is a desirable goal. In this scenario, a disk is taken away, and later made available to Oracle again, showing how ASM reacts by redistributing the data to take advantage of a disk's presence or accommodate its absence. This is done while the Oracle database, including the data that is being redistributed, is online and available for use as normal.
Before starting this tutorial, you should:
| 1. | Perform the Installing Oracle Database 10g on Windows tutorial. |
|
| 2. | Perform the Configuring Automatic Storage Management tutorial. |
|
To view disk groups in an existing ASM instance, 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 User Name, oracle as Password, SYSDBA in the Connect As field, and click Login.
|
| 2. | The Database home page appears with the ASM link in the General section. Click the ASM link.
|
| 3. |
The Automatic Storage Management home page appears. Click the Administration tab.
|
| 4. |
The first time you log in, enter sys as Username, oracle as Password, Connect As SYSDBA, select Save as Preferred Credentials, and click Login on the Automatic Storage Managment Login page.
|
| 5. |
Click the link for the DGROUP1 disk group.
|
| 6. |
View the disks in the disk group. Note that the data is evenly spread across the two available disks.
|
To add a disk to a disk group in an ASM instance, perform the following steps:
| 1. | Return to the Enterprise Manager Console, and click Add in the Member Disks region of the Disk Group page..
|
| 2. | Select All Disks from the Select Member Disks drop-down list.
The first time, you are using a newly stamped disk, its Header Status is PROVISIONED. If the disk has been previously dropped from a diskgroup and is now reused, its Header Status is FORMER.
|
| 3. | On the Add Disks page, select Rebalance Power 10, select also disk with the \\.\ORCLDISKDATA2 Path, enter DGROUP1_0002 as ASM Disk Name and click OK.
|
| 4. | View the newly added disk on the Disk Group page.
Then click Refresh in your web browser window. You may be able to see the rebalancing progress, if you click Refresh repeatedly.
|
To remove a disk from a disk group in an ASM instance, perform the following steps:
| 1. | On the Disk Group page, used in the last step of the previous topic, in the Member Disks region, select the disk DGROUP1_0002 and click Remove.
|
| 2. | Click Yes to confirm.
|
| 3. | When returned to the Disk Group page, click the Performance tab.
|
| 4. | Set the Refresh rate (see the top right of the page) to 30 seconds and observe how the graphs change after refreshing. Your graphs may be different from the ones displayed in the screenshot. Then click Home.
|
| 5. | On the Disk Group home page,.note that the DGROUP1_0002 disk has been removed.
|
Drop the TBS1 tablespace and the DGROUP1 disk group (coming from tasks in the previous tutorial).
| 1. | Open a terminal window and execute the following command: SET ORACLE_SID=ORCL
|
|
| 2. | To start a SQL*Plus session for the ORCL isntance, enter: sqlplus sys/oracle as sysdba
|
|
| 3. | From your SQL*Plus session, execute the following commands: drop tablespace tbs1 including contents and datafiles; exit
|
|
| 4. | To switch to the +ASM instance, execute the following command: SET ORACLE_SID=+ASM
|
|
| 5. | To start a SQL*Plus session for the +ASM instance, enter: sqlplus sys/oracle as sysdba
|
|
| 6. | From your SQL*Plus session, execute the following commands: drop diskgroup DRGOUP1 including contents; exit
|
|
| 7. | Close all open tutorial windows. | |
In this tutorial, you learned how to:
| View a disk group | ||
| Remove and add a disk | ||