|
|
Oracle Windows registry tips
Oracle Database Tips by Donald Burleson
Updated June 3, 2015 |
Question: I have
multiple ORACLE_HOME directories on my Windows server and I need
to understand the registry entries for these settings.
Answer: In Windows,
there is a place called the Registry (like the SYSGEN Parameter
file on VMS) that stores values that are used by the OS and
various software packages, and that includes Oracle.
The command at the Windows 'run' prompt is 'regedit'. I won't
get into Registry Editing here, since that is a full topic in
itself, but below are some of the main entries, and what they
are for.
HKEY_LOCAL_MACHINE\Software\Oracle -
is the home registry key.
ORA_sid_PFILE
- the path to your pfile
ORA_sid_AUTOSTART
- tells whether the sid should start when the service does.
Generally this should be TRUE
ORA_sid_SHUTDOWN
- tells whether to shutdown when the service stops. Again,
this should be TRUE.
ORA_sid_SHUTDOWN_TYPE
- How to shutdown by default when the service stops. IMMEDIATE
works here.
ORACLE_HOME - path to Oracle
Home
NLS_LANG - nls language setting for
the server
The Windows
registry allows for multiple instances and your can adjust the
following registry entries for each Oracle instance:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES\IDx
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_ora10g_Home1
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_ora10g_Home2
For complete details, see notes 124353.1 and note 208256.1 from
MOSC.
Main Oracle Windows Registry keys
To make Oracle on Windows automatically start and stops we use these
registry parameters:
hkey_local_machine->software->oracle->key_home_name->ora_sid_autostart
and
hkey_local_machine->software->oracle->key_home_name->ora_sid_shutdown
Also, the registry hkey_local_machine->software->oracle->key_home_name
holds some other very useful entries:
- oracle_base: The location of the oracle base directory for
this oracle home.
- oracle_home: The location of the oracle home
directory for this oracle home.
- oracle_sid: The oracle system identifier or sid.
- sqlpath: The location of sql scripts.
- rdbms_control: The location of Oracle control files
and the spfile/pfile for this instance.
To check the Oracle Windows Registry
Open the
registry with regedit. Always back up the registry before making changes.
Navigate to the key entry in the Windows registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\oracle_home_name.
There will be a key called:
ORA_SID_AUTOSTART.
SID is your database System ID and
SID should be set to TRUE.
If not the server starts but does
not start the database. There is also an ORA_SID_SHUTDOWN which you
want to be TRUE so that if the server is shut down the service will shutdown
the database.
If you want to manually start the database set
ORA_SID_AUTOSTART to FALSE. The Windows service will start but not the
Oracle database.
The difference between ORACLE_HOME and ORACLE_BASE
Check oracle_home Tips
Oracle Enterprise Manager - emctl not found in windows and HP-UX