Tag Archives: Check spfile location in ASM

Find out the SPFILE location in ASM

Find Out the Spfile Location in ASM

List the ASM Disk maps to be partition:

1. Find out the ASM disk configured.

ls -ltr /dev/sdb*
ls -lr /dev/oracleasm/disks/*

2. Scan the headers of those device.
If the parameter spfile and pfile returned some value that’s mean the spfile is located in that disk. if zero returns that’s means Spfile is not present in that disk.

kfed read /dev/sdb1 |grep -E 'spf|ausize'
kfdhdb.ausize:                  1048576 ; 0x0bc: 0×00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0×00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0×00000000

Search Spfile information in this Diskgroup

Repeat this steps for all mount point until you find the spfile. As follows:

kfed read /dev/sdb3 |grep -E 'spf|ausize'
kfdhdb.ausize:                  1048576 ; 0x0bc: 0×00100000
kfdhdb.spfile:                       16 ; 0x0f4: 0×00000010
kfdhdb.spfflg:                        1 ; 0x0f8: 0×00000001

The device /dev/sdb3 contains a copy of the ASM spfile (spfflg=1).The ASM spfile location starts at the disk offset of 16 (spfile=16). Considering the allocation unit size (kfdhdb.ausize = 1M),

3. Start the dump process as follows:

#dd if=/dev/sdb3 of=spfileASM.ora skip=16  bs=1M count=1

4. Use Strings command to read the spfileASM.ora

#strings spfileASM.ora

It will give you the ASM file from ASM storage.