Using asmcmd to Find the spfile and Password from 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 [oracle@host.dr]/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 [oracle@host.dr] --- ASM version [oracle@host.dr]/home/oracle>asmcmd -V ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /opt1/oracle asmcmd version 19.14.0.0.0 [oracle@host.dr]/home/oracle> --- Source ASM [oracle@host.dr]/home/oracle>. oraenv <<< +ASM [oracle@host.dr]/home/oracle>echo $ORACLE_HOME /opt/oracle/product/19c/grid [oracle@host.dr]/home/oracle> --- Find DB spfile [oracle@host.dr]/home/oracle>asmcmd find + spfile* +DATA/testdb_STB/PARAMETERFILE/spfile.1940.1080508983 +DATA/spfiletestdb.ora [oracle@host.dr]/home/oracle> --- Find ASM spfile [oracle@host.dr]/home/oracle>asmcmd spget /opt/oracle/product/18.5/grid/dbs/spfile+ASM.ora [oracle@host.dr]/home/oracle> --- Find DB password file [oracle@host.dr]/home/oracle>asmcmd find + pw* --- Find ASM password file [oracle@host.dr]/home/oracle>asmcmd pwget --asm /opt/oracle/product/18.5/grid/dbs/orapw+ASM [oracle@host.dr]/home/oracle>
Based on the information found, the ASM password file and spfile are still residing in old homes.
Conclusion
- Verify all configurations before removing previous software versions.
- Before removing the directory, rename the directory and append old to it.
- 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.
Share this
You May Also Like
These Related Stories
Oracle 12.2 ASM filter driver installation
Oracle 12.2 ASM filter driver installation
Dec 29, 2017
8
min read
ORA-15418: appliance mode not supported for compatible.asm 12.1.0.0.0
ORA-15418: appliance mode not supported for compatible.asm 12.1.0.0.0
Jul 20, 2016
1
min read
How To Reclaim ASM Disks
How To Reclaim ASM Disks
Aug 28, 2019
2
min read
No Comments Yet
Let us know what you think