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 Diazepam Buy Line Xanax Buy Adipex Tramadol Online Buy Hydrocodone Buy Line Xanax Lorazepam Adipex Generic Viagra Buy Propecia Buy Ephedrine Buy Generic Viagra Valium Online Buy Lexapro Buy Tramadol Online Prozac Phentermine Buy Xanax Acyclovir Lipitor Buy Tenuate Buy Online Xanax Ambien Lipitor Adipex Alprazolam Ultracet Buy Xanax On Line Buy Glucophage Adderall Buy Zyprexa Zyrtec Biaxin Buy Propecia Buy Butalbital Tramadol Norco Tenuate Fioricet Buy Codeine Ephedrine Buy Diazepam Biaxin Percocet Buy Cheap Phentermine Buy Ativan Buy Xanax Online Buy Vicodin Viagra Online Lorazepam Buy Phentermine Buy Vicodin Online Buy Codeine Buy Online Xanax Propecia Buy Carisoprodol Buy Tramadol Buy Adipex Butalbital Buy Ativan Buy Cialis Online Tramadol Online Cheap Phentermine Lexapro Acyclovir Buy Valium Online Buy Clonazepam Buy Biaxin Clonazepam Buy Xanax On Line Buy Fioricet Carisoprodol Buy Levitra Buy Vicodin Online Buy Glucophage Buy Xanax On Line Buy Cipro Buy Adderall Valium Buy Butalbital Buy Viagra