Skip to content

Oracle ASM Instance

    Oracle ASM is typically installed in an Oracle Grid Infrastructure home separate from the Oracle Database home. Only one Oracle ASM instance is supported on a server in a standard configuration; however, Oracle Flex ASM provides additional configuration options.

    Initialization Parameters and Oracle ASM Instance Creation

    The initialization parameters that are of specific interest for an ASM instance are:

    • INSTANCE_TYPE – Set to ASM or RDBMS depending on the instance type. The default is RDBMS.
    • DB_UNIQUE_NAME – Specifies a globally unique name for the database. This defaults to +ASM but must be altered if you intend to run multiple ASM instances.
    • ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance. The valid values range from 1 to 11, with 1 being the default. The higher the limit the more resources are allocated resulting in faster rebalancing operations. This value is also used as the default when the POWER clause is omitted from a rebalance operation.
    • ASM_DISKGROUPS – The list of disk groups that should be mounted by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM configuration changes are automatically reflected in this parameter.
    • ASM_DISKSTRING – Specifies a value that can be used to limit the disks considered for discovery. Altering the default value may improve the speed of disk group mount time and the speed of adding a disk to a disk group. Changing the parameter to a value which prevents the discovery of already mounted disks results in an error. The default value is NULL allowing all suitable disks to be considered.

    Incorrect usage of parameters in ASM or RDBMS instances result in ORA-15021 errors.

    To create an ASM instance first create a file called “init+ASM.ora” in the “/tmp” directory containing the following information.

    INSTANCE_TYPE=ASM

    Next, using SQL*Plus connect to the ide instance.

    export ORACLE_SID=+ASM
    sqlplus / as sysdba

    Create an spfile using the contents of the “init+ASM.ora” file.

    SQL> CREATE SPFILE FROM PFILE='/tmp/init+ASM.ora';
    
    File created.

    Finally, start the instance with the NOMOUNT option.

    SQL> startup nomount
    ASM instance started
    
    Total System Global Area  125829120 bytes
    Fixed Size                  1301456 bytes
    Variable Size             124527664 bytes
    Database Buffers                  0 bytes
    Redo Buffers                      0 bytes
    SQL>

    The ASM instance is now ready to use for creating and mounting disk groups. To shutdown the ASM instance issue the following command.

    SQL> shutdown
    ASM instance shutdown
    SQL>

    Once an ASM instance is present disk groups can be used for the following parameters in database instances (INSTANCE_TYPE=RDBMS) to allow ASM file creation:

    • DB_CREATE_FILE_DEST
    • DB_CREATE_ONLINE_LOG_DEST_n
    • DB_RECOVERY_FILE_DEST
    • CONTROL_FILES
    • LOG_ARCHIVE_DEST_n
    • LOG_ARCHIVE_DEST
    • STANDBY_ARCHIVE_DEST

    Startup and Shutdown of ASM Instances

    ASM instance are started and stopped in a similar way to normal database instances. The options for the STARTUP command are:

    • FORCE – Performs a SHUTDOWN ABORT before restarting the ASM instance.
    • MOUNT – Starts the ASM instance and mounts the disk groups specified by the ASM_DISKGROUPS parameter.
    • NOMOUNT – Starts the ASM instance without mounting any disk groups.
    • OPEN – This is not a valid option for an ASM instance.

    The options for the SHUTDOWN command are:

    • NORMAL – The ASM instance waits for all connected ASM instances and SQL sessions to exit then shuts down.
    • IMMEDIATE – The ASM instance waits for any SQL transactions to complete then shuts down. It doesn’t wait for sessions to exit.
    • TRANSACTIONAL – Same as IMMEDIATE.
    • ABORT – The ASM instance shuts down instantly.