Move SPFILE from ASM to File System

By | In Blog, Oracle | July 20th, 2011

The following is an example of how to move your SPFILE from ASM to your file system or vice versa.

ASM to File System

In this case, we have our spfile in the +DATA diskgroup and we want to move it to the default location on our file system. The default location will be in our $ORACLE_HOME/dbs directory. In order to accomplish this, we need to create a pfile from our existing spfile and then create the new spfile from this temporary pfile. Afterwords, we bounce the database instance for the change to take effect.

Cleaning up the old ASM spfile

At this point you may want to clean up the old spfile within ASM. To do that, use the asmcmd utility to remove the file. The file system spfile will take precedence over the ASM spfile, but it’s not a bad idea to remove the old spfile in ASM.

File System to ASM

The reverse procedure is similar. However, because Oracle will use the file system spfile first if it sees one, we need to remove or rename that file system spfile before bouncing the database instance.

Fixing an OMF spfile name

One common error you may run into is if you didn’t provide a full path to the spfile within your ASM diskgroup (i.e., you created the spfile as ‘+DATA’ instead of ‘+DATA/orcl/spfileorcl.ora’). If that happens, then Oracle is going to assign an Oracle Managed File (OMF) name to your spfile and all you need to do is create an alias for it using the asmcmd tool.

This code was tested on an Oracle 10g Standard Edition database.

To learn more about Datavail’s Oracle Database Administration services, contact us now. >>>

 

Contact Us

Leave a Reply

Your email address will not be published.
Required fields are marked (*).