[Translated from mos] How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1 ),

Source: Internet
Author: User
Tags windows x64

[Translated from mos] How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1 ),

 

Reference Original:
How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1)

Applicable:
Oracle Database-Enterprise Edition-Version 9.2.0.1 to 11.2.0.1.0 [Release 9.2 to 11.2]
Microsoft Windows (32-bit)
Microsoft Windows Itanium (64-bit)
Microsoft Windows x64 (64-bit)

Solution:
In windows, why cannot I set the 'oracle _ home' environment variable. ---> Note: the ORACLE_HOME key in the registry is not the same as the ORACLE_HOME environment variable in "System Properties"-"advanced"-"environment variable.

This article emphasizes that the 'oracle _ home' environment variable cannot be set, rather than the ORACLE_HOME key in the registry.

When you set ORACLE_HOME environment, and so on), Oracle software will obtain the ORACLE_HOME information from the environment variable (this refers to when the ORACLE_HOME environment variable is set, this information may not match the information obtained from the registry.
---> Note: Under normal circumstances (that is, windows does not set the ORACLE_HOME environment variable), the oracle executable program in windows is running, the variable information obtained from the ORACLE_HOME key value in the Registry (variable)

When you call an Oracle executable program on windows, for example, sqlplus.exe, the variables used by these executable programs are the PATH environment variables and the locations of these executable programs (I .e: the Oracle Home) of the program.

---> Please note: based on my experience in using oracle on windows, windows knocks on a command under cmd and a command under unix, windows and unix operating systems use different methods to search for the command you typed:
In windows, you can search for the sqlplus.exe command in the current directory (for example, c: \ user \ administrator). If no sqlplus.exe command exists in the current directory, go to the PATH environment variable to check whether the sqlplus command exists.
In unix, you can run the SQL plus command at the shell prompt. unix only looks for the SQL plus command from the PATH.


Notes about rac on windows:
On 11gR2, there are two home types: GI Home and db Home. Setting the ORACLE_HOME environment variable on windows will cause all clusterware logs (and other potential problems) to be written into Oracle Home, which will make it difficult to diagnose clusterware issues.

Oracle determines the location of the executable program.

1. Execute programs in the ORACLE_HOME \ bin directory:
You do not need to set "ORACLE_HOME = specific path" in environment variables. This is because the Oracle software determines the location of the executable file (for example, c :\... \ oracle \ bin), and a 'pointer 'file (pointer file) will be opened at this location. This pointer file specifies the location in the Registry to search for Oracle variables. The ORACLE_HOME key in the registry is the variable value used by Oracle software. Therefore, there is no need to set ORACLE_HOME = environment variable for any process that uses the executable file in ORACLE_HOME \ bin.

Second,For executable files that do not exist in ORACLE_HOME \ bin but need to be loaded with oracle software (for example, a web server process or other third-party software)
If a third-party software requires a specific Oracle DLL (Dynamic Link Library), the third-party software will find the PATH environment variable value until the DLL is found, and then the DLL will penetrate (or through) process (the process described above) to locate the pointer file, and then locate ORACLE_HOME value.

Different Methods for starting oracle executable programs:

1. Start from the cmd prompt
When you enter the name of the executable program without all the paths, you will first obtain the PATH environment variable and the executable program of Oracle Home. You can use the set command to change the PATH environment variable, or use the control panel-system, change the environment variable, click the application, and then open a new cmd command prompt.
---> Note: This statement is incorrect. It is estimated that oracle engineers who write this article do not understand the search sequence of executable programs in windows. --- in windows, in the current directory (for example, "c: \ user \ administrator"), click the sqlpluscommand. If no sqlplus.exe command exists in the current directory, go to the PATH environment variable to check whether the sqlplus command exists.

2. Start Menu
It will call the executable program in all paths pointed to in the shortcut.

3. Start-running call (not in start-running process, press cmd, and then tap the executable command)
Read the executable program from the PATH environment variable.

Use OUI to modify the default Oracle Home and PATH Environment Variables
You can use OUI to specify an Oracle Home as the default Oracle Home. OUI updates the PATH environment variable to point to the Oracle Home

Call the OUI from the beginning-Program-Oracle-OraDb10g_home1-Oracle Installation Products-Universal Installer
Click "installed products", and then open the "Environment" Tab to view the environment variables of Oracle Home.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.