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.


Bontril Buy Xanax Online Buy Norvasc Ephedrine Ultracet Buy Norco Hydrocodone Viagra Online Buy Viagra Buy Cialis Online Buy Flexeril Buy Percocet Lexapro Buy Online Xanax Buy Soma Diflucan Buy Diflucan Buy Soma Carisoprodol Tramadol Online Fioricet Buy Adderall Cipro Buy Celexa Buy Phentermine Cheap Phentermine Buy Darvocet Buy Tramadol Lorazepam Buy Viagra Online Buy Zovirax Tramadol Buy Ativan Vicodin Zovirax Seroquel Buy Cheap Phentermine Xanax On Line Buy Lexapro Buy Cialis Darvocet Buy Phentermine Buy Viagra Online Buy Didrex Buy Adderall Buy Ephedrine Diazepam Butalbital Bupropion Buy Phentermine Buy Generic Viagra Prozac Xanax Seroquel Effexor Buy Phentermine Online Meridia Acyclovir Buy Zyprexa Xanax Online Valium Online Norco Buy Clonazepam Buy Carisoprodol Buy Lipitor Buy Ultram Buy Ultram Adderall Buy Cipro Buy Norco Buy Zyrtec Buy Zyprexa Nexium Buy Propecia Buy Meridia Buy Diazepam Effexor Buy Glucophage Valium Zocor Buy Tramadol Online