2 Replies Latest reply: Jan 27, 2011 7:43 AM by Levi Pereira RSS

    Questions about SPFILE in ASM 11G

    Levi Pereira
      I did some tests on Oracle 11G ASM and questions arose.

      Look..

      I deleted my SPFILE, and start the ASM.

      echo $ORACLE_HOME
      /u01/app/11.2.0/grid_crs

      export ORACLE_SID=+ASM1

      sqlplus / as sysasm

      Connected to an idle instance.

      SQL> startup
      ORA-00099: warning: no parameter file specified for ASM instance
      ASM instance started

      Total System Global Area 283930624 bytes
      Fixed Size 2212656 bytes
      Variable Size 256552144 bytes
      ASM Cache 25165824 bytes
      ORA-15110: no diskgroups mounted

      Oracle instance started a dummy ..

      SQL> show parameter dummy
      dummyinstance boolean TRUE


      Now I will create a PFILE to start the ASM.

      vi /home/oracle/asm_init.ora
      *.cluster_database_instances=2
      ASM1.instance_name='ASM1'
      ASM1.instance_name='ASM2'
      *.instance_type=ASM
      *.asm_diskstring='/dev/oracleasm/disks/*'
      *.diagnostic_dest='/u01/app/oracle'
      *.asm_diskgroups='DATA'
      *.asm_power_limit=1
      *.large_pool_size=12M
      *.remote_login_passwordfile='EXCLUSIVE'


      Now i will start instance with new PFILE.
      SQL> startup pfile=asm_init.ora
      ASM instance started

      Total System Global Area 283930624 bytes
      Fixed Size 2212656 bytes
      Variable Size 256552144 bytes
      ASM Cache 25165824 bytes
      ASM diskgroups mounted
      ASM diskgroups volume enabled


      Now I will create the SPFILE from PFILE.

      SQL> create spfile='+DATA' from pfile='/home/oracle/asm_init.ora';

      File created.

      From here, questions arise.

      I will restart intance using new spfile.

      SQL> shutdown ;
      ASM diskgroups volume disabled
      ASM diskgroups dismounted
      ASM instance shutdown
      SQL>


      I'll check for init files in the directory $CRS_HOME/dbs

      ls /u01/app/11.2.0/grid_crs/dbs
      ab_+ASM1.dat
      hc_+ASM1.dat 

      No init file...both nodes

      Now I will start the ASM instance with new SPFILE.

      SQL> startup
      ASM instance started

      Total System Global Area 283930624 bytes
      Fixed Size 2212656 bytes
      Variable Size 256552144 bytes
      ASM Cache 25165824 bytes
      ASM diskgroups mounted
      ASM diskgroups volume enabled
      SQL> show parameter spfile

      NAME TYPE VALUE
      ------------------------------------ ----------- ------------------------------
      spfile string +DATA/asm/asmparameterfile/registry.253.732993435



      The more interesting than the second node was also the instance with dummy .. just restarting the ASM instance in second node he finds SPFILE.


      In GPnP ... no SPFILE

      $srvctl config asm
      ASM home: /u01/app/11.2.0/grid_crs
      ASM listener: LISTENER




      Docs said. ...


      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, 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

      2. PFILE in the Oracle ASM instance home


      Questions ...

      How ASM 11g find the path of the SPFILE?

      When we run the CREATE SPFILE he records the path of the SPFILE in somewhere?

      How ASM reads the SPFILE that inside of a DG who theoretically was not mounted?