Several Oracle clients are installed on the machine (from 8 to 11). The client was last installed in the ora10 folder. When I connect to using sqlplus to database, the parameters are read from the tns file in the subdirectory of the ora10 directory. How to change the path to the tnsname file to another?

    1 answer 1

    You need to change or set the value of the ORACLE_HOME environment variable. Also, if there are several clients, you need to look at which client’s SQLPlus is running. If the address is not specified explicitly, then the first one found will be selected when traversing the Path variable (the test goes from left to right). In the absence of the ORACLE_HOME variable ORACLE_HOME SQLplus goes to look in tnanames.ora in the folder for its default version.

    • I did not find such a variable in the "environment variables", and in the registry I have ORACLE_HOME for each version of the oracle. What exactly should I change? System under Windows. In the command line set oracle_home , in response I get a message that the variable is not defined - Viktorov
    • How many, that is, you have three times Oracle registered in your HKEY_LOCAL_MACHINE / Software / Oracle branch? - plesser
    • Inside Oracle there are many subdirectories by version. Complete the answer that you need to change either OrkalHom or the value of the Path variable - Viktorov
    • Changing the value of the Path variable I fear will not help you, since the program will climb into the system to look at where Oracle is installed, and when you install the last client, you obviously have to reset the variable. Try searching the program Oracle Home Selector then ... - plesser
    • I have already solved the problem. 5 installed clients means 5 sqplus. The last client installed in PATH on the left the path to sqlplus from Orakla 10 version. And for this, by default, it was launched from the command line and, accordingly, climbed dozens of directories. Changing the PATH led to the launch of another version of sqlplus that got into other directories for tns - Viktorov