Managing an Automatic Storage Management Instance:

Managing an Automatic Storage Management Instance:
Startup and shutdown ASM Instance:

Starting Up ASM Instance:

An ASM instance is managed in much the same way as a database instance, with a few exceptions. The major difference is that an ASM instance is never opened like a regular Oracle instance is opened, only mounted; therefore, we can issue the STARTUP NOMOUNT; command to start just the ASM instance's memory processes, and then finish mounting the database with the ALTER DATABASE MOUNT; command. We can also open the ASM instance immediately by issuing the STARTUP MOUNT; command

$> export ORACLE_SID=+ASM
$> sqlplus "sys as sysdba"
SQL*Plus: Release - Production on Tue Dec 13 16:58:17 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to an idle instance.

SQL> startup mount;
ASM instance started
Total System Global Area 100663296 bytes
Fixed Size 787648 bytes
Variable Size 99875648 bytes
Database Buffers 0 bytes
Redo Buffers 0 bytes
ASM diskgroups mounted.

Shutdown ASM Instance:

To shut down this ASM instance, Set the ORACLE_SID environment variable and then simply issue the SHUTDOWN IMMEDIATE; command:
$> export ORACLE_SID=+ASM
$> sqlplus "sys as sysdba"
SQL> Connected.
SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown

Implications of Shutting Down an Active ASM Instance: When an ASM instance is shut down, it is important to be aware of the implications for any regular Oracle database instance that is using ASM files stored on that ASM instance. The ASM files will not be accessible to those regular Oracle databases until the ASM instance is restarted.

Create Disk Group:
NORMAL REDUNDANCY: (Two – Way Mirroring)
create diskgroup +DATA normal redundancy
2 failgroup f1 disk '/dev/raw/raw5' name disk5
3 failgroup f2 disk '/dev/raw/raw6' name disk6;
HIGH REDUNDANCY: (Three – Way Mirroring)
create diskgroup +DATA normal redundancy
2 failgroup f1 disk '/dev/raw/raw5' name disk5
3 failgroup f2 disk '/dev/raw/raw6' name disk6;
4 failgroup f2 disk '/dev/raw/raw6' name disk7;

EXTERNAL REDUNDANCY: (If we want no mirroring by ASM)

Adding Disks into Disk Group:

alter diskgroup +DATA add disk '/dev/raw/raw7' name disk7;

Dropping Disk

alter diskgroup +DATA drop disk disk7;
When we drop the last disk from the FAILGROUPS, the FAILGROUP automatically drops.

Resize Disk Group:

alter diskgroup +DATA resize disk raw5 size 800M;
Mounting and Dismounting Disk Groups
Disk groups that are specified in the ASM_DISKGROUPS initialization parameter are mounted automatically at ASM instance startup. We can do this manually using below.

Mounting Disk Group:


Dismounting Disk Group:


Create Tablespace with ASM:
Create tablespace TBS_NAME datafile ‘+DATA’ Size 1024m;

Viewing ASM Instance Information Via SQL Queries:

There are several dynamic and data dictionary views available to view an ASM configuration from within the ASM instance itself:

V$ASM_ALIAS - Shows every alias for every disk group mounted by the ASM instance
V$ASM_CLIENT - Shows which database instance(s) are using any ASM disk groups that are being mounted by this ASM instance
V$ASM_DISK - Lists each disk discovered by the ASM instance, including disks that are not part of any ASM disk group
V$ASM_DISKGROUP - Describes information about ASM disk groups mounted by the ASM instance
V$ASM_FILE - Lists each ASM file in every ASM disk group mounted by the ASM instance
V$ASM_OPERATION - Like its counterpart, V$SESSION_LONGOPS, it shows each long-running ASM operation in the ASM instance
V$ASM_TEMPLATE - Lists each template present in every ASM disk group mounted by the ASM instance

We can also able to query the following dynamic views against database instance to view the related ASM storage components of that instance:

V$ASM_DISKGROUP - Shows one row per each ASM disk group that's mounted by the local ASM instance
V$ASM_DISK - Displays one row per each disk in each ASM disk group that are in use by the database instance
V$ASM_CLIENT - Lists one row per each ASM instance for which the database instance has any open ASM files

The benefits of ASM:
• Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
• Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O performance
• Adding disks is straight forward - ASM automatically performs online disk reorganization when you add or remove storage
• Uses redundancy features available in intelligent storage arrays
• The storage system can store all types of database files
• Using disk group makes configuration easier, as files are placed into disk groups
• ASM provides stripping and mirroring
• ASM and non-ASM oracle files can coexist


Victoryperfect said...

I actually enjoyed reading through this posting.Many thank

Send Cakes to Chennai

Sridevi Koduru said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, OAF, ADF, SQL, PL/SQL, D2K at | +91 - 9581017828.