Using asmcmd to Find the spfile and Password from ASM

Posted in: Oracle, Technical Track

I’m currently reviewing an environment that has been upgraded to 19c based on information from oratab. The reason for the review is to remove previously installed versions of the software.



Oracle software is installed to ORACLE_HOME, with variables pointing to directory location.

To my surprise, there are references to the previous ORACLE_HOME.

Here are the details:

--- Check oratab
[[email protected]]/home/oracle>grep -Ev "^#|^$" /etc/oratab
testdb:/opt/oracle/product/19c/db_1:N         # line added by Agent
+ASM:/opt/oracle/product/19c/grid:N            # line added by Agent
[[email protected]]

--- ASM version
[[email protected]]/home/oracle>asmcmd -V
The Oracle base remains unchanged with value /opt1/oracle
asmcmd version
[[email protected]]/home/oracle>

--- Source ASM
[[email protected]]/home/oracle>. oraenv <<< +ASM
[[email protected]]/home/oracle>echo $ORACLE_HOME
[[email protected]]/home/oracle>

--- Find DB spfile
[[email protected]]/home/oracle>asmcmd find + spfile*
[[email protected]]/home/oracle>

--- Find ASM spfile
[[email protected]]/home/oracle>asmcmd spget
[[email protected]]/home/oracle>

--- Find DB password file
[[email protected]]/home/oracle>asmcmd find + pw*

--- Find ASM password file
[[email protected]]/home/oracle>asmcmd pwget --asm
[[email protected]]/home/oracle>

Based on the information found, the ASM password file and spfile are still residing in old homes.


  1. Verify all configurations before removing previous software versions.
  2. Before removing the directory, rename the directory and append old to it.
  3. After a defined time period, delete the directory.


I hope you found this post helpful. Feel free to drop any questions or share your thoughts in the comments, and make sure to sign up for updates.






Want to talk with an expert? Schedule a call with our team to get the conversation started.

No comments

Leave a Reply

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