Using asmcmd to Find the spfile and Password from ASM

Posted in: Oracle, Technical Track
asm

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
ORACLE_SID = [+ASM] ?
The Oracle base remains unchanged with value /opt1/oracle
asmcmd version 19.14.0.0.0
[[email protected]]/home/oracle>

--- Source ASM
[[email protected]]/home/oracle>. oraenv <<< +ASM
[[email protected]]/home/oracle>echo $ORACLE_HOME
/opt/oracle/product/19c/grid
[[email protected]]/home/oracle>

--- Find DB spfile
[[email protected]]/home/oracle>asmcmd find + spfile*
+DATA/testdb_STB/PARAMETERFILE/spfile.1940.1080508983
+DATA/spfiletestdb.ora
[[email protected]]/home/oracle>

--- Find ASM spfile
[[email protected]]/home/oracle>asmcmd spget
/opt/oracle/product/18.5/grid/dbs/spfile+ASM.ora
[[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
/opt/oracle/product/18.5/grid/dbs/orapw+ASM
[[email protected]]/home/oracle>

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

Conclusion

  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.

 

 

 

email

Author

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 *