Alternate locations for database parameter files in 11g - Part 4 of 7

USING THE WINDOWS REGISTRY KEY ORA_$ORACLE_SID_PFILE TO REFERENCE A PFILE
————————————————————————-
On Windows:

a)  Place an pfile called INITORCL11.ora in the location C:\Alternate_Location.

b)  Open the registry editor (Start - run - REGEDIT or REGEDT32).
  
c) Browse to the registry key  HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_OraDb11g_home1  

   (Note: The final parameter could be different in your installation, or if you have more than one 11g installation).
d) Add a new “String Value” called:  

   ORA_ORCL11_PFILE

   (Note: replace ORCL11 in the above with the SID of your database)

   Set the value of this key to be: C:\Alternate_Location\INITORCL11.ora

e) If you then start the Windows service for the database, you will see the following message in the alert log:
Using parameter settings in client-side pfile C:\ALTERNATE_LOCATION\INITORCL11.ORA on machine SERVER1
You’ll also notice that in %ORACLE_HOME%\database the file oradim.log (as used by oradim) contains the entries:

C:\app\Administrator\product\11.1.0\db_1\bin\oradim.exe -startup -sid orcl11 -usrpwd * -pfile C:\Alternate_Location\INITORCL11.ora -log oradim.log -nocheck 0
Note: You should be aware that this setting is only effective when using the Windows Service to start the database.  If you manually start the database logged into SQLPLUS*, then the instance will try to use a parameter file in the default location again.
f) You can also amend the value of the ORA__PFILE registry key using ORADIM.

e.g. oradim -EDIT -SID ORCL11 -PFILE C:\Alternate_Location\INITORCL11.ora     

These commands would update the registry key ORA__PFILE to reference the file C:\Alternate_Location\INITORCL11.ora. 
If this key doesn’t exist when you run the command, it will add the key, if the key exists then it will update the value that the key points to.

You should be aware that if your windows service is currently referencing an SPFILE then running these commands will add the registry key and will also set the service to reference the PFILE instead.  (Refer to the next section for the commands to revert back to the SPFILE).  

 

USING THE WINDOWS REGISTRY KEY ORA_$ORACLE_SID_PFILE TO REFERENCE AN SPFILE
—————————————————————————
Note: There is no ORA__SPFILE key. If you try to add one, the windows service just ignores it and the instance won’t start.  (No registry key is required, as if you are using an SPFILE, then it is assumed that it will be in the default location).

Using the previous method to directly reference an SPFILE called C:\Alternate_Location\SPFILE.ora won’t work and the instance will fail to start.

To reference an SPFILE called C:\Alternate_Location\SPFILE.ora

a) Create a file C:\Alternate_Location\DBPARAMS.ora and then just add the line:

SPFILE=C:\Alternate_Location\SPFILE.ora
b) Configure the same registry string value as in the previous example, but this time set the value to be:  

C:\Alternate_Location\DBPARAMS.ora
c) Re-start the windows service.

The alert log now shows the entry:

Using parameter settings in server-side spfile C:\ALTERNATE_LOCATION\SPFILE.ORA

  spfile                   = “C:\ALTERNATE_LOCATION\SPFILE.ORA”

 

Note: As with the previous example, these settings will not be retained if you re-start the database using SQLPLUS commands.  The registry settings are only referenced when using the Windows service to start the database.

As far as using oradim is concerned, although there is a -SPFILE option available, you can’t specify the name of the SPFILE after this parameter.
(DIM-00003: An argument is missing for the parameter if you try it).  The command assumes that your SPFILE will be in the default location.
(i.e. oradim -EDIT -SID ORCL11 -SPFILE  - sets the database to startup using an SPFILE in the default location).

You should be aware that if your windows service is currently referencing a PFILE, then running these commands will delete the registry key and will also set the service to reference the SPFILE instead.  (Refer to the first section of this blog for commands to revert back to using the PFILE).  

 

Leave a Reply

You must be logged in to post a comment.


Buy Zocor Bupropion Lipitor Tramadol Buy Phentermine Buy Clonazepam Buy Norvasc Buy Cialis Buy Vicodin Online Online Xanax Buy Clonazepam Glucophage Buy Lortab Buy Meridia Buy Vicodin Online Flexeril Buy Diflucan Ativan Xanax Buy Xanax Lorazepam Buy Xanax Online Buy Flexeril Zithromax Buy Zyban Buy Xanax On Line Vicodin Buy Ultram Meridia Ultram Buy Ativan Buy Codeine Diazepam Buy Alprazolam Buy Lexapro Diflucan Carisoprodol Buy Norco Buy Oxycontin Levitra Buy Darvocet Buy Valium Online Buy Bontril Ultracet Lortab Buy Hydrocodone Xanax Buy Zocor Propecia Generic Viagra Lexapro Buy Generic Viagra Buy Levitra Propecia Buy Acyclovir Buy Cialis Online Xanax Buy Oxycontin Buy Codeine Buy Percocet Online Xanax Buy Butalbital Meridia Buy Soma Nexium Zyban Valium Online Buy Butalbital Tramadol Buy Hydrocodone Buy Phentermine Lexapro Zyrtec Buy Bupropion Buy Vicodin Online Buy Viagra Online Cheap Phentermine Buy Propecia Buy Ultram Buy Zithromax Phentermine Online