Oracle Spfile Location



How to Modify Oracle spfile Location. Login to Oracle Server (node 1 for example, srv0dbx01) su - oracle. Srv0dbx01 ORA1020 /export/home/oracle. Thanks for this information. I changed a parameter in such a bad way, that oracle did not start anymore. Converting the spfile to a pfile, editing the pfile and reconverting the corrected pfile to the spfile made oracle happy (and me too). SQL show parameter spfile; If your ASM instance uses spfile the above result will show you the location which would be something like '+DATA/asm/parameter/.' You can navigate ASM diskgroup using 'asmcmd' command.

  1. Oracle Spfile Parameter
  2. Oracle Startup Spfile
  3. Create Pfile From Spfile 11g
  4. Oracle Rac Spfile Location

This morning, I was wondering how ASM Instance could be started if the SPFILE is stored inside ASM Disk. ASM Disk won’t be online/mounted if ASM Instance isn’t started.

Oracle

So the first thing I did was to confirm that the SPFILE is in the ASM Disk. I logged in to the ASM instance using sql plus.

I was surprised to get empty value. In a database instance, this usually signifies that the instance is not using SPFILE. So I checked the $ORACLE_HOME/dbs directory to see if there’s a file named init+ASM.ora.

I don’t see it as well. This is a good time to start googling my answer 🙂

I found one good article written by Aychin Gasimov which explain how ASM Instance is able to know where is the SPFILE and access it.

Here is the link: http://aychin.wordpress.com/2011/01/22/oracle-11gr2-asm-spfile-eng/

Oracle Spfile Location

To sum it up, Oracle gets the information from css daemon which reads the information from OLR file (Oracle Local Registry) at /etc/oracle directory (Linux).

Oracle ASM spfile is stored in <ASMDISKGROUP>/ASM/asmparameterfile/ directory. I guess the directory is hidden because we can’t see it using ASMCMD.

More details at Aychin’s article.

Information about How To Modify Oracle RAC spfile Location
This document will explain how to modify the location of the spfile with the srvctl command.

Todd Walters

  • Oracle RAC is installed on srv0dbx01, srv0dbx02, and srv0dbx03
  • Each Instance is called PWAKdbX where X is the node, i.e. PWAKDB1
  • srvctl is used to control all nodes. srvctl -h will show you syntax help
  • showcrs script stored in oracle home directory will show status of all nodes.
  • If srvctl does not stop and start instance properly verify TNS_ADMIN env is set.
  • TIP: Run export SRVM_TRACE=TRUE
    Then try and start instance:$ srvctl start instance -d PWAKdb -I PWAKdb3
    This will then let you see the log file as it starts and check for errors.
  1. Login to Oracle Server (node 1 for example, srv0dbx01)
  2. Source CRS
    • srv0dbx01 | ORA1020 | /export/home/oracle
      > .
      oraenv
      ORACLE_SID = [ORA1020] ?
      CRS
      srv0dbx01 | CRS | /export/home/oracle
      >
      cd $ORACLE_HOME
      srv0dbx01 | CRS | /u00/app/oracle/product/10.2.0/CRS
    • > srvctl status instance -d PWAKdb -i PWAKdb1
      Instance PWAKdb1 is running on node srv0dbx01
    • srvctl stop instance -d PWAKdb -i PWAKdb1
    • > srvctl status instance -d PWAKdb -i PWAKdb1
      Instance PWAKdb1 is not running on node srv0dbx01
  3. Run the command in number 8 to modify the database to specify the location of the spfile.
  4. srvctl modify database -d PWAKdb -p +PWAK_DATA_01/PWAKDB/spfilePWAKdb.ora
Srvctl start instance -d PWAKdb -I PWAKdb1
  1. Wath the trace and it showed the spfile going to PWAK_data_01
  2. Test everything by running crs_stop -all and waited for everything to stop.
  3. Next, run crs_start -all and everything should start successfully.
  4. Run this command to view the settings of the db and you can see the spfile is now set to the correct location?

Oracle Spfile Parameter

[main] [12:22:42:700] [OCRTree.printParallelServerConfig:719] Printing content of database name=PWAKDB
[main] [12:22:42:700] [OCRTree.printParallelServerConfig:720] domain=WORLD

Oracle Startup Spfile

[main] [12:22:42:700] [OCRTree.printParallelServerConfig:721] oraclehome=/u00/app/oracle/product/10.2.0/DB
[main] [12:22:42:700] [OCRTree.printParallelServerConfig:722] spfile=+PWAK_DATA_01/PWAKDB/spfilePWAKdb.ora
[main] [12:22:42:700] [OCRTree.printParallelServerConfig:723] enabled=true

Create Pfile From Spfile 11g

[main] [12:22:42:700] [OCRTree.printParallelServerConfig:727] envs: TNS_ADMIN=/u00/app/oracle/product/10.2.0/ASM/network/admin
[main] [12:22:42:701] [OCRTree.printParallelServerConfig:730] Finishing printing content of database name=PWAKDB

Oracle Rac Spfile Location