How to configure ASM in windows?

Automatic Storage Management, or ASM, is a facility provided with the Oracle database for managing your disks. It is an Oracle-aware logical volume manager, or LVM, that can stripe and mirror database files and recovery files across a number of physical devices. This is an area where the database administration domain
overlaps with the system administration domain.
Many databases will not use ASM: they will store their files on the volumes provided by the operating system, which may well be managed by an LVM. But if you do not have a proper logical LVM, as will probably be the case with low-end systems running on, for example, Linux or Windows, then ASM provides an excellent (and bundled) alternative to purchasing and installing one. On high-end systems, ASM can work with whatever LVM is provided by the operating system.

You can play with ASM even in your local computer by creating virtual ASM disks. There are different ways to do it in windows and Linux. Here I am explaining a method to create asm disks in window.

You can just follow the steps given below.

Step 1: Creating a dummy disks

We need 1G free space to do this demo. We are going to create two dummy disks of 512 MB.

(Assuming D:  drive is having more than 1G free space )

Create a directory called asmdisks in D:\ drive 

D:\>cd asmdisks
D:\asmdisks>asmtool -create F:\asmdisks\ disk1 512
D:\asmdisks>asmtool -create F:\asmdisks\ disk2 512

Now you have 2 dummy disks  of 512MB

Step 2:  Configuring Cluster Synchronization Service

C:\>c:\oracle\product\ 10.2.0\db_ 1\BIN\localconfi g add

Step 1: stopping local CSS stack
Step 2: deleting OCR repository
Step 3: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'ap\arogyaa' , privgrp ''..
Operation successful.
Step 4: creating new CSS service
successfully created local CSS service
successfully reset location of CSS setup

step 3: Creating init file (pfile)

 Save a file as "C:\oracle\product\ 10.2.0\db_ 1\database\ init+ASM. ora" with the following lines in it.

ASM_DISKSTRING= 'D:\asmdisks\ *'

Step 4: Creating service and password file

c:\> oradim -NEW -ASMSID +ASM -STARTMODE auto
c:\> orapwd file=C:\oracle\ product\10.2.0\db_1\ database\ PWD+ASM.ora password=oracle

Step 5:  Creating  ASM disk group and enter in parameter file
 Create asm disk group

sqlplus / as sysdba
SQL> select path, mount_status from v$asm_disk;
PATH                  MOUNT_STATUS
--------------------- -------------


SQL> create diskgroup D1 external redundancy disk
Diskgroup created.

create spfile from pfile and add newly created diskgroup in to it.

SQL> create spfile from pfile;
SQL> startup force;
SQL> alter system set asm_diskgroups= D1 scope=spfile;

SQL> startup force
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1247420 bytes
Variable Size 57472836 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted


Your AMS instance is ready with ASMDISKS mounted. You can use this disk to store ASMFILES.

No comments:

Post a Comment