configuring automatic storage management

23
9/19/2015 Configuring Automatic Storage Management http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 1/23 Configuring Automatic Storage Management Purpose This tutorial illustrates how Automatic Storage Management (ASM) can be implemented on a small scale (as a confidence-building exercise). Time to Complete Approximately 60 minutes Topics This tutorial covers the following topics: Overview Scenario Prerequisites Creating an ASM Instance and a Disk Group with DBCA Testing the ASM Installation Reconfiguring Enterprise Manager Testing the Reconfigured Enterprise Manager Summary Viewing Screenshots 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. Overview Automatic Storage Management (ASM) provides a vertical integration of the file system and the volume manager which is specifically built for Oracle database files. This example illustrates how to configure ASM for a single database instance. Use the Database Configuration Assistant (DBCA) for configuring ASM, which includes creating and starting an ASM instance and creating a disk group with two "disks". Then you test the installation by confirming that: All relevant Windows Services are started You can query the +ASM instance in SQL*Plus You can use your ASM installation by creating a tablespace and a table with a row in the ORCL instance Enterprise Manager can display information about the ASM instance. To do so, modify Enterprise Manager with the Enterprise Manager Configuration Assistant (emca ). Finally, test the reconfigured Enterprise Manager Database Console. Note: This tutorial is a prerequisite for the Managing Automatic Space Management Disk Groups tutorial. Back to Topic List Scenario On your database server, there is no ASM instance running. You decide to create one, as well as a disk group. The disk group uses "disks" in form of existing unformatted partitions of 196 MB. Before a disk can be used by a disk group, its header has to be stamped. Then you decide to create a test tablespace in SQL*Plus, to confirm that you have access to the +ASM instance. You also want to use Enterprise Manger as a tool to manage ASM, so you need to reconfigure it. Back to Topic List Prerequisites Before starting this tutorial, you should:

Upload: pravin2projects

Post on 10-Dec-2015

238 views

Category:

Documents


1 download

DESCRIPTION

vdfdfd

TRANSCRIPT

Page 1: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 1/23

Configuring Automatic Storage Management

Purpose

This tutorial illustrates how Automatic Storage Management (ASM) can be implemented on a small scale (as aconfidence-building exercise).

Time to Complete

Approximately 60 minutes

Topics

This tutorial covers the following topics:

Overview

Scenario

Prerequisites

Creating an ASM Instance and a Disk Group with DBCA

Testing the ASM Installation

Reconfiguring Enterprise Manager

Testing the Reconfigured Enterprise Manager

Summary

Viewing Screenshots

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 thescreenshot associated with that step. You can hide an individual screenshot by clicking it.

Overview

Automatic Storage Management (ASM) provides a vertical integration of the file system and the volume manager which isspecifically built for Oracle database files. This example illustrates how to configure ASM for a single database instance.

Use the Database Configuration Assistant (DBCA) for configuring ASM, which includes creating and starting an ASMinstance and creating a disk group with two "disks". Then you test the installation by confirming that:

All relevant Windows Services are startedYou can query the +ASM instance in SQL*PlusYou can use your ASM installation by creating a tablespace and a table with a row in the ORCL instance

Enterprise Manager can display information about the ASM instance. To do so, modify Enterprise Manager with theEnterprise Manager Configuration Assistant (emca). Finally, test the reconfigured Enterprise Manager DatabaseConsole.

Note: This tutorial is a prerequisite for the Managing Automatic Space Management Disk Groups tutorial.

Back to Topic List

Scenario

On your database server, there is no ASM instance running. You decide to create one, as well as a disk group. The diskgroup uses "disks" in form of existing unformatted partitions of 196 MB. Before a disk can be used by a disk group, itsheader has to be stamped. Then you decide to create a test tablespace in SQL*Plus, to confirm that you have access tothe +ASM instance. You also want to use Enterprise Manger as a tool to manage ASM, so you need to reconfigure it.

Back to Topic List

Prerequisites

Before starting this tutorial, you should:

Page 2: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 2/23

Before starting this tutorial, you should:

1. Perform the Installing Oracle Database 10g on Windows tutorial.

2. Download the asminst.zip into your working directory (c:\wkdir) and unzip it.

3. Prepare disk groups

To install ASM, you need to have one or more unformatted "raw" partitions available. This tutorial uses partitions on G,H, I and J of each 196 MB.

Note: Creating disk partitions is a sensitive operation, which should only be executed by qualified system administrators.For more information about preparing disk groups for an Automatic Storage Management installation, see the OracleDatabase Installation Guide 10g Release 2 (10.2) for Microsoft Windows.

Back to Topic List

Creating an ASM Instance and a Disk Group with DBCA

To create an ASM instance and a disk group with DBCA, perform the following steps:

1. To start a SQL*Plus session, select Start > Programs > Oracle - OraDb10g_home1 > Configuration andMigration Tools > Database Configuration Assistant.

DBCA starts its GUI interface.

Page 3: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 3/23

2. Click Next on the Welcome page.

3. Select Configure Automatic Storage Management and click Next.

Page 4: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 4/23

4. A Database Configuration Assistant: Warning window informs you of your next steps.

Note your path. You may see a different path depending on your Oracle home value.

Page 5: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 5/23

5. Open a command prompt window and enter the following command with the path from the previous window:

e:\oracle\ora10g\bin\localconfig add

After the batch file added a CSS service, click the Close icon on the top-right window frame to close the commandwindow.

6. Now click OK in the Database Configuration Assistant: Warning window.

7. Click Next on the Operations page

Page 6: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 6/23

8. On the Create ASM Instance page, enter oracle in the SYS password and Confirm SYS password fields and

click Next.

Page 7: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 7/23

9. A message appears informing you that DBCA will create and start the ASM instance. Click OK.

The ASM Instance Creation window appears, then the ASM Disk Groups page.

10. Click Create New on the ASM Disk Groups page.

Page 8: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 8/23

11. On the Create Disk Group page, enter DGROUP1 as Disk Group Name. If you are using disks, which have neverbeen used for ASM, click Stamp Disks.

Page 9: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 9/23

Alternatively, if you are using disks, which have been previously used for ASM, you do not need to stamp theirheader. Please proceed to step 16.

Page 10: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 10/23

12. On the asmtool operation page, select Add or change label and click Next.

13. With click and Shift+click, select partitions 6,7,8 and 9 on the Select disks page. If your partitions are stamped for

Page 11: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 11/23

13. With click and Shift+click, select partitions 6,7,8 and 9 on the Select disks page. If your partitions are stamped forthe first time, they appear with the Status "Candidate device". If the they have been previously stamped, and thelabel has been deleted, they appear with the status "Unstamped ASM device". Click Next.

14. Click Next on the Stamp disks page.

Page 12: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 12/23

15. Click Finish on the Message ASM page.

Place the cursor over this icon to see the image

Wait until the disks appear on the Create Disk Group page. They have the Header Status PROVISIONED becausethey are not yet assigned to a disk group.

16. On the Create Disk Group page, select Show All. then select the disks with the \\.\ORCLDISKDATA0 and\\.\ORCLDISKDATA1 path, and click OK.

If you are working with newly stamped disks, they look like the following screenshot:

Page 13: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 13/23

If they have been previously used for ASM, they look like this:

Page 14: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 14/23

17. The disk group is being created and mounted.

18. Click Finish on the ASM Disk Groups page.

Page 15: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 15/23

19. Click No to cexit.

Back to Topic List

Testing the ASM Installation

To test your ASM installation, perform the following steps:

Viewing Windows Services

Querying ASM Information in SQL*Plus

Creating a Tablespace and a Table

Back to Topic List

Viewing Windows Services

To view your ASM and CSS services on Windows, perform the following steps:

1. To view Windows Services, select Start > Settings > Control Panel > Administrative Tools > Services.

Page 16: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 16/23

2. Scroll down to the Oracle services and confirm that the following services are started; if not, use Actions > Start, tostart them: OracleASMService+ASM, OracleCSService, OracleDBConsoleorcl,OracleOraDb10g_homeTNSListener and OracleServiceORCL.

3. Click X (the Close icon) on the top-right window frame, to close the Services window.

Back to Topic

Querying ASM Information in SQL*Plus

To view disk group characteristics, perform the following steps:

1. Open a terminal window and execute the following command:

SET ORACLE_SID=+ASM

Page 17: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 17/23

2. To start a SQL*Plus session, enter:

sqlplus sys/oracle as sysdba

3. Execute the following command to query ASM information:

@c:\wkdir\query

The query.sql file includes the following command:

select name, state, type, total_mb, free_mb from v$asm_diskgroup;

4. To exit from your SQL*Plus session, enter:

exit

Back to Topic

Creating a Tablespace and a Table

To use your ASM installation, create a tablespace and a table with one row in the ORCL instance. Perform the followingsteps:

1. To point to the ORCL instance, enter in a command prompt window:

SET ORACLE_SID=ORCL

2. To start a SQL*Plus session, enter:

sqlplus sys/oracle as sysdba

Page 18: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 18/23

3. To create objects in the ORCL schema, execute the following commands:

@c:\wkdir\create

The create.sql file includes the following commands:

create tablespace tbs1 datafile '+DGROUP1' size 20M;

create table tab1 (col1 number) tablespace tbs1;

insert into tab1 values (-44);

commit;

Back to Topic

Reconfiguring Enterprise Manager

If this is the first time, that you are creating an ASM instance, you need to reconfigure dbcontrol with the EnterpriseManager Configuration Utility (emca) untility. This reconfiguration allows you to access ASM information from EnterpriseManager Database Control. Perform the following steps:

1. Open a terminal window and execute the following command to stop dbconsole:

emctl stop dbconsole

2. To recreate the Enterprise Manager repository, enter the following command:

emca -repos recreate

Page 19: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 19/23

emca -repos recreate

Provide parameters for the repository re-creation. Enter at the appropriate prompt:

Database SID: orclListener port number: 1521Password for SYS user: oracle <the password does not appear > Password for SYSMAN user: oracle <the password does not appear >Do you wish to continue? [yes(Y)/no(N)]: y

Then wait. The re-creation of the Enterprise Manager repository may take about 15 minutes depending on yoursystem setup.

3. To deconfigure dbcontrol, enter the following command:

emca -deconfig dbcontrol db

Enter the following values when prompted:

Database SID: orclDo you wish to continue? [yes(Y)/no(N)]: y

The deconfiguration is generally faster than the repository re-creation. The actual time depends on your systemsetup.

Page 20: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 20/23

4. To reconfigure dbcontrol, enter the following command:

emca -config dbcontrol db

Provide parameters for the reconfiguration. Enter the following values when prompted:

Database SID: orclListener port number: 1521Password for SYS user: oracle <the password does not appear > Password for DBSNMP user: oracle <the password does not appear >Password for SYSMAN user: oracle <the password does not appear >

Enter nothing for the next questions (just press the Enter key):

Email address for notifications (optional):Outgoing Mail (SMTP) server for notifications (optional):ASM ORACLE_HOME [E:\oracle\product\10.2.0\db_1 ]:ASM SID [ +ASM ]: ASM PORT [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]:

Enter at the prompt:

ASM user password: oracle <the password does not appear >ASM user password: oracle <the password does not appear >Do you wish to continue? [yes(Y)/no(N)]: y

Page 21: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 21/23

The actual time for the reconfiguration depends on your system setup.

Back to Topic List

Testing the Reconfigured Enterprise Manager

To test your reconfiguration, 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.

Page 22: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 22/23

Enter sys as User Name, oracle as Password, SYSDBA in the Connect As field, and click Login.

2. The first time you log in, the Licensing page appears.

Scroll to the bottom and click I agree.

Page 23: Configuring Automatic Storage Management

9/19/2015 Configuring Automatic Storage Management

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/install/asminst/asminst_otn.htm 23/23

3. The Database home page appears with the ASM link in the General section.

Note: This tutorial is a prerequisite for the Managing Automatic Space Management Disk Groups tutorial.

Back to Topic List

Summary

In this tutorial, you learned how to:

Create an ASM instance and a disk group

Test your ASM installation

Reconfigure and test Enterprise Manager as ASM tool

Back to Topic List

Place the cursor over this icon to hide all screenshots.