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.


Alprazolam Buy Cheap Phentermine Bontril Buy Norvasc Buy Hydrocodone Online Buy Bupropion Zyprexa Online Xanax Phentermine Online Diflucan Buy Acyclovir Meridia Buy Carisoprodol Cheap Phentermine Buy Percocet Buy Zovirax Buy Ephedrine Buy Vicodin Buy Zyban Codeine Nexium Buy Phentermine Buy Prozac Carisoprodol Lorazepam Buy Line Xanax Flexeril Tenuate Buy Butalbital Valium Online Buy Lexapro Buy Percocet Buy Flexeril Adipex Buy Cialis Online Zithromax Buy Phentermine Online Xanax Hydrocodone Ativan Buy Adderall Buy Zyprexa Buy Didrex Buy Ativan Buy Phentermine Online Buy Online Xanax Percocet Cheap Phentermine Buy Tramadol Glucophage Viagra Online Buy Online Xanax Buy Zyprexa Buy Valium Online Vicodin Phentermine Online Buy Zyban Buy Glucophage Buy Xanax On Line Buy Adderall Buy Vicodin Buy Alprazolam Buy Cipro Buy Zyprexa Buy Cheap Phentermine Buy Viagra Online Buy Diflucan Buy Zovirax Propecia Ativan Buy Percocet Buy Norvasc Buy Carisoprodol Buy Xanax Buy Lortab Buy Cheap Phentermine Buy Lexapro Buy Bontril Buy Carisoprodol Adderall Xanax Online