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.


Bupropion Lipitor Buy Ativan Acyclovir Phentermine Online Xanax Buy Zovirax Buy Hydrocodone Online Xanax On Line Glucophage Buy Bontril Lortab Zithromax Acyclovir Buy Tramadol Online Adderall Buy Lexapro Buy Percocet Adipex Buy Ambien Buy Butalbital Buy Biaxin Buy Online Xanax Buy Cialis Buy Xanax Buy Zithromax Buy Levitra Biaxin Buy Ultram Fioricet Buy Seroquel Buy Tramadol Online Buy Vicodin Buy Nexium Zyprexa Lipitor Diazepam Buy Zyprexa Celexa Buy Hydrocodone Online Buy Generic Viagra Prozac Ultram Buy Codeine Buy Prozac Diflucan Buy Biaxin Tenuate Buy Carisoprodol Prozac Buy Lorazepam Vicodin Buy Bupropion Buy Xanax On Line Vicodin Valium Online Lexapro Buy Didrex Phentermine Online Buy Seroquel Lexapro Buy Vicodin Flexeril Prozac Buy Meridia Zyban Viagra Online Phentermine Carisoprodol Celexa Tenuate Butalbital Cheap Phentermine Ultracet Buy Acyclovir Buy Cheap Phentermine Buy Flexeril Paxil Buy Zithromax Seroquel Celexa