Tuesday, November 6, 2012

Configuring Initialization Parameters for Oracle ASM Instances


Configuring Initialization Parameters for Oracle ASM Instances
To install and initially configure an Oracle ASM instance, use Oracle Universal Installer (OUI) and Oracle ASM Configuration Assistant (ASMCA).
After an Oracle ASM instance has been installed on a single-instance Oracle Database or in an Oracle Real Application Clusters (Oracle RAC) environment, the final Oracle ASM configuration can be performed. Only a few Oracle ASM-specific instance initialization parameters must be configured. The default values are usually sufficient.
Initialization Parameter Files for an Oracle ASM Instance
When installing Oracle ASM in an Oracle Restart (standalone) configuration, Oracle Universal Installer (OUI) creates a separate server parameter file (SPFILE) and password file for the Oracle ASM instance. The ASM SPFILE is stored in a disk group during installation.
When installing Oracle ASM in a clustered Oracle ASM environment, OUI creates a single, shared SPFILE for Oracle ASM in a disk group.
When upgrading an Oracle ASM instance, if the ASM SPFILE was originally in a shared file system, then the upgraded Oracle ASM instance retains the SPFILE in the same location. If the original Oracle ASM instance used a PFILE, after an upgrade the instance continues to use a PFILE.
You can use an SPFILE or a text-based initialization parameter file (PFILE) as the Oracle ASM instance parameter file. If you use an SPFILE in a clustered Oracle ASM environment, then you must place the SPFILE in a disk group, on a shared raw device, or on a cluster file system. Oracle recommends that the Oracle ASM SPFILE is placed in a disk group. You cannot use a new alias created on an existing Oracle ASM SPFILE to start the Oracle ASM instance
If you do not use a shared Oracle Grid Infrastructure home, then the Oracle ASM instance can use a PFILE. The same rules for file name, default location, and search order that apply to database initialization parameter files also apply to Oracle ASM initialization parameter files.
When an Oracle ASM instance searches for an initialization parameter file, the search order is:
  1. The location of the initialization parameter file specified in the Grid Plug and Play (GPnP) profile
  2. If the location has not been set in the GPnP profile, then the search order changes to:
    1. SPFILE in the Oracle ASM instance home
For example, the SPFILE for Oracle ASM has the following default path in the Oracle Grid Infrastructure home in a Linux environment:
$ORACLE_HOME/dbs/spfile+ASM.ora
    1. PFILE in the Oracle ASM instance home
Note:
A PFILE or SPFILE is required if your configuration uses non-default initialization parameters for the Oracle ASM instance.
You can administer Oracle ASM initialization parameter files with SQL*Plus, Oracle Enterprise Manager, ASMCA, and ASMCMD commands.
Backing Up, Copying, and Moving an Oracle ASM Initialization Parameter File
You can back up, copy, or move an Oracle ASM SPFILE with the ASMCMD spbackup, spcopy or spmove commands. For information about these ASMCMD commands, see "spbackup", "spcopy", and "spmove".
You can also use the SQL CREATE SPFILE to create an Oracle ASM SPFILE when connected to the Oracle ASM instance.
You can copy and move an Oracle ASM PFILE with the commands available on the specific platform, such as cp for Linux.
After copying or moving an SPFILE or PFILE, you must restart the instance with the SPFILE or PFILE in the new location to use that SPFILE or PFILE.
If the COMPATIBLE.ASM disk group attribute is set to 11.2 or greater for a disk group, you can create, copy, or move an Oracle ASM SPFILE into the disk group.
For example, after upgrading an Oracle ASM instance from 11g release 1 (11.1) to 11g release 2 (11.2), you could place the Oracle ASM SPFILE in a disk group that has COMPATIBLE.ASM set to 11.2.
In the following steps, assume an Oracle ASM 11g release 2 (11.2) instance is using a PFILE stored in $ORACLE_HOME/dbs/asmspfile.ora. You can use the SQL CREATE SPFILE statement to create an SPFILE from a PFILE stored in a local or shared file system. If a PFILE does not exist, then it could be created with the SQL CREATE PFILE statement.
To create an SPFILE in a disk group, perform the following steps:
  1. Connect to the Oracle ASM instance.
For example:
$ sqlplus / as sysasm
  1. Create an SPFILE in a disk group that has COMPATIBLE.ASM set to 11.2 with the SQL CREATE SPFILE statement.
For example, create an Oracle ASM SPFILE from the existing PFILE.
SQL> CREATE SPFILE = '+DATA/asmspfile.ora'
       FROM PFILE = '$ORACLE_HOME/dbs/asmpfile.ora';
The CREATE SPFILE statement also updates the Grid Plug and Play (GPnP) profile. You can check the location of the Oracle ASM SPFILE in the GPnP profile with the ASMCMD spget command. See "spget".
  1. Restart the Oracle ASM instance so that the instance reads the SPFILE in the new location.

Setting Oracle ASM Initialization Parameters

There are several initialization parameters that you must set for an Oracle ASM instance. You can set these parameters with Oracle ASM Configuration Assistant (ASMCA). You can also set some parameters after database creation using Oracle Enterprise Manager or SQL ALTER SYSTEM or ALTER SESSION statements.
The INSTANCE_TYPE initialization parameter is the only required parameter in the Oracle ASM instance parameter file. The Oracle ASM* parameters use suitable defaults for most environments. You cannot use parameters with names that are prefixed with Oracle ASM* in database instance parameter files.
Some database initialization parameters are also valid for an Oracle ASM instance initialization file. In general, Oracle ASM selects the appropriate defaults for database parameters that are relevant to an Oracle ASM instance.

Automatic Memory Management for Oracle ASM

Automatic memory management automatically manages the memory-related parameters for both Oracle ASM and database instances with the MEMORY_TARGET parameter. Automatic memory management is enabled by default on an Oracle ASM instance, even when the MEMORY_TARGET parameter is not explicitly set. The default value used for MEMORY_TARGET is acceptable for most environments. This is the only parameter that you must set for complete Oracle ASM memory management. Oracle strongly recommends that you use automatic memory management for Oracle ASM.
If you do not set a value for MEMORY_TARGET, but you do set values for other memory related parameters, Oracle internally calculates the optimum value for MEMORY_TARGET based on those memory parameter values. You can also increase MEMORY_TARGET dynamically, up to the value of the MEMORY_MAX_TARGET parameter, just as you can do for the database instance.
Although it is not recommended, you can disable automatic memory management by either setting the value for MEMORY_TARGET to 0 in the Oracle ASM parameter file or by running an ALTER SYSTEM SET MEMORY_TARGET=0 statement. When you disable automatic memory management, Oracle reverts to auto shared memory management and automatic PGA memory management. To revert to Oracle Database 10g release 2 (10.2) functionality to manually manage Oracle ASM SGA memory, also run the ALTER SYSTEM SET SGA_TARGET=0 statement.

No comments:

Post a Comment