7 Replies Latest reply: May 13, 2012 10:44 PM by 937051 RSS

    Switching between 9i and 11g clients in Windows 7

    776766
      Is it possible to have both a 9i home and 11g home on Windows 7? I need to connect to a legacy 8i server with the 9i client.

      What I attempted:
      1. I installed 9i, then installed 11g.
      2. My connections to servers using the 11g home worked great. Connection to 8i failed (not supported).
      3. Through OUI, I set 9i as the first home in the environment path.
      4. The connection the 8i server worked. Connection to other servers failed.
      5. Through OUI, switched back to the 11g as the first home in the environment path.
      6. Connections to 8i work, but others do not. The obvious observation is that the path did not switch everything back appropriately.

      I thought that multiple Oracle homes were ok? But I can't seem to switch them from 9i to 11g.

      Any thoughts or ideas?

      thanks.
        • 1. Re: Switching between 9i and 11g clients in Windows 7
          sb92075
          Any thoughts or ideas?
          This is easily handled in an *NIX environment.                                                                                                                                                                                           
          • 2. Re: Switching between 9i and 11g clients in Windows 7
            Charles Hooper
            I am a bit surprised that you were able to install the Oracle 9i client on Windows 7. I have had trouble making the Oracle 10g R2 client work correctly on Windows 7 - I was able to connect to the database from SQL*Plus but not all database applications. If you are able to make the connection work simply by changing the order of the system path, you can cheat to make the Oracle 9i client appear to be first in the path for just that program. Start up Notepad on the computer and paste the following into the Notepad window:
            SET PATH=C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\
            START C:\WINDOWS\NOTEPAD.EXE
            EXIT
            The first line above changes the path environment variable for just the script. The second line starts another copy of Notepad, inheriting the PATH and other variables from the script. The last line makes certain that the script window closes.

            Now, save the file with a .BAT extention, for example with a name like "pathtest.bat", then exit Notepad. If you then double-click the file that was just saved a black screen shoud appear for 1/4 second (or less) and then a copy of Notepad should open.

            If you have a copy of Microsoft's free Process Explorer utility (download from Microsoft.com), start the program, then double-click the notepad.exe file in the list. Switch to the Environment tab and scroll to the Path variable - it should be set to:
            C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\
            Once you verify that the above works, modify the script file to set the correct path for your Oracle 9i client, and change C:\WINDOWS\NOTEPAD.EXE to start the program that will use the Oracle 9i client. Finally, fix the normal system path variable so that the Oracle 11g client is listed first in the path.

            ---

            Option 2, if you have either the Professional or Ultimate editions of Windows 7. Download Microsoft's free Windows XP mode virtual machine and install the Oracle 9i client in that virtual machine. You should be able to create an icon that automatically launches the Windows XP mode virtual machine and then runs a specific program inside the virtual machine (I have not yet tested the auto-launch feature).

            ---

            Option 3, if the programs will use an ODBC connection, install one of the Oracle clients, create the ODBC connection that will use that client, install the other Oracle client, and create the ODBC connection that will use that client.

            Charles Hooper
            Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
            http://hoopercharles.wordpress.com/
            IT Manager/Oracle DBA
            K&M Machine-Fabricating, Inc.
            • 3. Re: Switching between 9i and 11g clients in Windows 7
              sybrand_b
              Your post is incomplete and requires crystal balls. 'Connection failed' doesn't tell anything, as we are to guess the error message.
              Apparently you try to economize on the time you spend here: as much as help as possible, with as little effort as possible on your side.

              Most likely however the source of your problem is you don't understand the impact of multiple Oracle Homes and/or you don't read documentation. Most people here don't read documentation.en
              When you set up two homes, you will have two copies of tnsnames.ora.
              You need to make one of them the master tnsnames.ora and set TNS_ADMIN to that directory.

              -------------------
              Sybrand Bakker
              Senior Oracle DBA
              • 4. Re: Switching between 9i and 11g clients in Windows 7
                776766
                Thanks for the replies! Yes, I should be more specific about the issue.

                I am using Windows 7 Professional (32-bit), connecting to Oracle databases with SQL Server 2008 (32-bit). The 11g client provides the OraOLEDB.Oracle provider for 99% of the Oracle servers. There is one 8i server I need to connect to which is why I installed the 9i client.

                As documented, connections to Oracle 8i are not supported by 11g (error ORA-03134).
                ------------------------------
                OLE DB provider "MSDAORA" for linked server "ECOP" returned message "ORA-03134: Connections to this server version are no longer supported."
                ------------------------------

                However, I believe multiple Oracle homes should allow the connection from 9i to 8i.

                When installing 9i first, then 11g, with 11g first in the environment path, ORA-03134 occurs when connecting to 8i (expected).
                Using the OUI, and switching 9i to first in the environment path, the connection to 8i succeeds (great).
                Using the OUI, and switching back to 11g as first in the environment path, connection to 8i succeeds, but others (non-8i) fail.

                I believe this sequence through OUI accomplishes the same idea Charles suggested above with creating .BAT files.
                Perhaps I am incorrect, but the TNSNAMES.ora and LDAP.ora are the same in both client homes so I don't believe that to be the issue.

                I will try just disabling the 9i home upon switching back next to see if that gets rid of any conflict.
                • 5. Re: Switching between 9i and 11g clients in Windows 7
                  737979
                  It sounds like you got past the Window7 / Oracle 9i issue that has stumped many of us. Kudos to you.

                  Now it sounds like you need to adjust your PATH variable when you need to connect to the 9i database.
                  If you examine your environment
                  open a command window / run CMD.EXE and enter PATH
                  right click "Computer" select "Properties", then "Advanced System Settings", then "Environment Variables" then scroll down to PATH

                  You will see the ORACLE_HOME\bin directory in your path.
                  You will want to set up a CMD file / batch file for your 9i app.
                  This CMD file should set your path to point to the 9i binaries first, then run your app.
                  • 6. Re: Switching between 9i and 11g clients in Windows 7
                    776766
                    Well yep, that was quick. Removing the 9i client from the env path through the OUI (uncheck the 9i home to remove from the path environment variable), allows 11g to once again take control and those servers work again. (I have to restart the SQL Server instance in-between)

                    A note on the 9i/Windows 7: the key for me was installing 9i first, then the 11g client in separate homes. I also installed an 11g ODAC package after the 11g client into the 11g client home. I believe there are shared resources between the 9i/11g clients and the order of installation made a difference for me.

                    This will work for now; however it throws a wrench in creating a SSIS package to automate both data pulls from 8i and non-8i servers. On second thought, I think the batch files Charles suggested might work along some some cmd line commands from the SSIS package to start/stop the SQL server (net send start/stop).


                    *If anyone has ideas for keeping 11g and 9i in the environmental path concurrently and having the correct client providers initiate (11g+OraOLEDB.Oracle for non-8i servers; 9i + MSDAORA for the legacy 8i server) without disabling the other client, please let me know.

                    Thanks again.

                    Edited by: user4900054 on Aug 23, 2010 8:12 AM
                    • 7. Re: Switching between 9i and 11g clients in Windows 7
                      937051
                      Hi,

                      I have "*Oracle 9i Enterprise Edition Release 9.0.1.1.1 - Production*" database hosted on Windows Server 2003, 32 bit machine and users are using Windows 7 Enterprise, 64 bit.

                      I installed Oracle Client 11g R2 64 bit installation on a test Windows 7 Enterprise, 64 bit machine, followed [https://forums.oracle.com/forums/thread.jspa?messageID=10292252]. and Client 11g R2 64 bit installation was indeed successful. However, when I tried to go to "Microsoft ODBC Administrator" and tried to configure development server (Oracle 9i database, 32 bit) I this error:

                      Unable to connect
                      SQLState=S1000
                      [Oracle][ODBC][Ora]ORA-03134: Connections to this server version are no longer supported.

                      Q1: Is it possible to connect to Oracle 9i database, 32 bit machine to Oracle Client 11g R2 64 bit machine?
                      Q2: If yes, how can I achieve this?

                      Thanks in advance.