Print Thread
installation both 10g and 11g
#48463 01/09/14 07:27 PM
Joined: Jan 2014
Posts: 4
R
Member
OP Offline
Member
R
Joined: Jan 2014
Posts: 4
Hi,

Can we install both 10g and 11g in a system. Right now I installed Oracle 11g Express edition in my system. And then when i tried to install 10g Express edition it says the following. If I want both in one system, what i need to do?

---------------------------
Oracle Database 10g Express Edition - InstallShield Wizard
---------------------------
The install cannot proceed as service OracleServiceXE is present on the system. Remove the service, reboot the system and retry the installation.
---------------------------
OK
---------------------------

Re: installation both 10g and 11g
Ramesh538 #48464 01/10/14 09:50 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Oracle creates an "OracleService<DATABASE>" service for every database created. If you have an 10g and 11g database, they must have different names (e.g. not both "XE").


Marco Kalter
Allround Automations
Re: installation both 10g and 11g
Marco Kalter #48537 01/27/14 07:49 PM
Joined: Jan 2014
Posts: 4
R
Member
OP Offline
Member
R
Joined: Jan 2014
Posts: 4
Hi Marco,

I created 10g XE(initially) and started working on it. Today,I installed 11g Standard Edition in my system. After, restarting the system, I opened PLSQL Developer. Now It is showing only 11g DB name which I created and it is not listing XE in Database combo. I manually entered DB name as XE and entered username and password. It is throwing error like
ORA-12154: TNS:could not resolve the connect identifier specified. I assume, PLSQL Developer is looking into the tnsnames.ora file of 11g but not 10g. How to connect to both in different sessions with PLSQL Developer. I am able to connect to 10g and 11g both in sqlplus.

Re: installation both 10g and 11g
Ramesh538 #48539 01/28/14 10:55 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
PL/SQL Developer (and SQL*Plus) can connect to any database that is allowed by the Oracle Net configuration of the client. The SQLNET.ORA file (located in <OracleHome>\Network\Admin) defines which name resolution methods are supported (e.g. TNSNAMES and EZCONNECT). For the first name resolution method the TNSNAMES.ORA file defines which databases can be accessed.


Marco Kalter
Allround Automations
Re: installation both 10g and 11g
Ramesh538 #48544 01/29/14 10:30 AM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
The problem you are facing is related to the fact that now you have two Oracle Clients and each one has separate configuration ("sqlnet.ora", "tnsnames.ora", etc.). PL/SQL Developer uses one of the Oracle Clients - the one that is set in registry/environment variables (in that case the one from 11g DB) - and it does not have the 10g entries in it's configuration files.
I suggest merging (manually) "tnsnames.ora" (and "sqlnet.ora") files from both Oracle Clients and pointing both Oracle Clients to such one merged file (specify path to the folder containing that file in TNS_ADMIN registry/environment variable). The other solution (which allows separate "sqlnet.ora" files and one common "tnsnames.ora" file) is to use hardlink (which essentially puts one file in two folders at the same time; works on NTFS partitions, not on FAT32 ones).

Re: installation both 10g and 11g
Hilarion #48573 02/05/14 08:35 PM
Joined: Jan 2014
Posts: 4
R
Member
OP Offline
Member
R
Joined: Jan 2014
Posts: 4
Hi Marco/Hilarion,

I tried merging only the tnsnames.ora(copied 11g tnsdata into 10g tnsdata) and then opened PLSQL Developer. Now in database combo both 10g and 11g DB names are listing and successfully connecting. Thnx a lot for helping me.

By the way, I just want to share some info about connecting 10g and 11g which I noticed while doing trial and errors.
Firstly, I installed 10g. A path value referencing to the BIN folder of the installed DB is appended to the environmental variable PATH.

Before Installing 10g: PATH variable contains
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;

After Installing 10g: PATH variable contains
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;D:\oracle\10g\app\oracle\product\10.2.0\server\bin;

Here, I am able to connect to 10g through sqlplus and PLSQL Developer.

Now, I installed 11g : PATH variable contains
D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;D:\oracle\10g\app\oracle\product\10.2.0\server\bin;

Here, sqlplus and PLSQL Developer refers to only 11g but not 10g.
sqlplus sys/*** will connect to 11g.
PLSQL Developer will list only 11g DB name in its combo.
Even,i tried to connect to 10g through sqlplus by giving sys/***@XE
But I got the below error
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

Reason is 11g BIN path is first placed in the Environment varaible PATH.

Then I Uninstalled 10g: PATH variable contains
D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;

sqlplus and PLSQL Developer connects to 11g fine.

Then I Installed 10g: PATH variable contains
D:\oracle\10g\app\oracle\product\10.2.0\server\bin;D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;

Here, sqlplus and PLSQL Developer refers to only 10g but not 11g.
sqlplus sys/*** will connect to 10g.
PLSQL Developer will list only 10g DB name in its combo.
Even,i tried to connect to 11g through sqlplus by giving sys/***@11gdb
But I got the below error
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified.

Then I merged the tnsnames.ora(copied 11g tnsdata into 10g tnsdata).
Now sqlplus and PLSQL Developer connects to both.

Conclusion : SQLPlus looks only the tnsnames.ora file of the Oracle client which is first placed in the PATH environment variable. If that tnsnames.ora file is merged with the data of the other oracle client, it will connect to both. If we install a new DB, its BIN path will be prefixed to the PATH variable and it would get preference.

Re: installation both 10g and 11g
Ramesh538 #48581 02/08/14 08:27 AM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
As I wrote before: You can use only one Oracle Client at a time. That Oracle Client uses always it's own "tnsnames.ora" file (or the file it's pointed to by registry/environment variables). You can use different Oracle Client versions to connect to different Oracle Database versions.
The PATH environment variable is what points to specific Oracle Client. Eg. when you use PL/SQL Developer it uses Oracle Client which is found by PATH variable (is specified first in that variable). If you use Windows command line (cmd.exe) and type "sqlplus", then the "sqlplus.exe" is found using the PATH variable and that "sqlplus.exe" uses Oracle Client from it's own folder.

To summarize: It's not the application (PL/SQL Developer nor SQL*Plus) that is looking for "tnsnames.ora" file, it's the Oracle Client library that is used by the application, that looks for it.

I suggest that you make sure you are using Oracle 11g Client (as it's better to use with Oracle 11g Databases and works very well with Oracle 10g Databases) and put everything you need in it's "tnsnames.ora" file. Leave the Oracle 10g Client's "tnsnames.ora" file empty, to protect yourself from accidentally using it.

Re: installation both 10g and 11g
Hilarion #48615 02/18/14 06:49 AM
Joined: Jul 2004
Posts: 24
Germany
H
Member
Offline
Member
H
Joined: Jul 2004
Posts: 24
Germany
Like stated by Hilarion, PATH Settings are responsible for oracle client selection.

I didnt test this, but idea to be able to use either oracle installation would be to simply call plsd form cmd box after setting/changing preferred (bin) oracle client path inside there.
Perhaps useful for special test scenarios.

set path = c:\path2mypreferredORAclient\bin;%PATH%
should be sufficient
Of course You have to align tnsnames before.

Maybe there are command line options making this work with just 2 different links to PLSD, dont know.

Last edited by herzig; 02/18/14 06:54 AM.

regards
Re: installation both 10g and 11g
herzig #48617 02/18/14 11:46 AM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
The PL/SQL Developer has Oracle Home and OCI library selection option (Tools / Preferences / Oracle / Connection) but for some reason it did not work for me - I had to adjust PATH variable for PL/SQL Developer environment.
Oracle Home selection is also available from PL/SQL Developer execution parameters (command line), as "oraclehome" (eg. "plsqldev.exe oraclehome=home1").

What I found useful for executing PL/SQL Developer with different Oracle Clients was PL/SQL Developer's "env:<VAR>" execution parameter, which allows adjusting any environment variable, including PATH (eg. "plsqldev.exe env:PATH=C:\orahome\bin;%PATH%"). This way you can easily create separate shortcuts to run PL/SQL Developer with different Oracle Client selection.

You can also benefit from PL/SQL Developer's "tns_admin" execution parameter, which allows pointing the application to the folder from which you want your "tnsnames.ora" file to be used.

All those execution (command line) parameters can also be specified in "params.ini" file of PL/SQL Developer. That way you will not have to specify them on command line each time. You can also combine those two solutions (if any parameter is specified in both, then execution parameters take precedence over "params.ini" file).


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.038s Queries: 14 (0.012s) Memory: 2.5493 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-18 21:17:30 UTC
Valid HTML 5 and Valid CSS