Datatombraider's Blog

2010/10/18

How to repair a misconfigured or corrupted ASM spfile

Filed under: Oracle — datatombraider @ 21:14

While playing around with flash cache i managed to get a typo in the ASM spfile and ASM cowardly refused to start. no biggie, let’s start ASM with a pfile, right? hmm, wrong as i found out. ASM simply ignored my pfile because it alway use the one provided by GPNP. After some hair-pulling i found a solution to fix the problem. The trick is to remove the spfile from the GPNP profile which starts ASM with defaults and then create a new spfile from a saved pfile. here’s the complete procedure:

– stop crs on all nodes
# crsctl stop crs

– unsign profile on one node
$ cd GRID_HOME/gpnp/rac11r2-1/profiles/peer
$ gpnptool unsign -p=profile.xml -ovr -o=profile.xml

– change attribute SPFILE to SPFILE=”” in unsigned profile.xml

– sign profile
$ gpnptool sign -p=profile.xml -ovr -o=profile.xml -w=file:../../wallets/peer -rmws

– start crs in exclusive mode on the node with the changed profile
# crsctl start crs -excl

– ASM starts with defaults because it has no pfile or spfile

– create a new spfile from saved pfile, the GPNP profile will automatically updated with a reference to the new SPFILE
SQL> create spfile=’+’ from pfile=”;

– stop crs and start it normally
# crsctl stop crs
# crsctl start crs

– start crs on all other nodes, the new changed profile will be propagated to them
# crsctl start crs

 

I don’t understand why a user-supplied pfile in “startup pfile=asm.pfile” does not override the spfile reference from GPNP profile. Have to verify the issue in 11.2.0.2, maybe it’s fixed now.

Advertisements

4 Comments »

  1. Useful!
    I wonder if something’s changed in case of Oracle restart (instead of clusterware RAC). !? Please advise

    Comment by Liviu — 2011/07/13 @ 11:41 | Reply

    • i don’t use Oracle Restart so i don’t know, sorry.

      Comment by datatombraider — 2011/07/13 @ 19:55 | Reply

  2. Hi, datatombraider
    Great post
    I have a question for you:
    when you said: – change attribute SPFILE to SPFILE=”” in unsigned profile.xml
    Did you edit the profile.xml file using the OS vi, or you just used the gpnptool edit command?

    thanks.

    Comment by gavinliao — 2012/01/17 @ 09:50 | Reply

    • i used vi but you can also use gpnptool.

      Comment by datatombraider — 2012/01/17 @ 18:57 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.