7 Replies Latest reply: May 23, 2013 6:28 AM by EdStevens RSS

    wrong version of sqlplus is opening

    Maahjoor
      Dear all,

      i have installed oracle 11g R2 on windows 7 64 bit.
      recently i un-installed oracle database 10g from my system.

      now when i open the cmd, and type sqlplus, it is opening the 10g version of sql plus. like below
      C:\Users\Administrator>sqlplus
      
      SQL*Plus: Release 10.1.0.4.2 - Production on Thu May 23 10:07:29 2013
      
      Copyright (c) 1982, 2005, Oracle.  All rights reserved.
      
      Enter user-name:
      instead i want to open 11g sql. how to do that?

      Thanks
        • 1. Re: wrong version of sqlplus is opening
          Gaurav_91
          use
          C:\Windows\system32>set oracle_sid=orcl
          
          C:\Windows\system32>sqlplus
          
          SQL*Plus: Release 11.2.0.1.0 Production on Thu May 23 11:45:49 2013
          
          Copyright (c) 1982, 2010, Oracle.  All rights reserved.
          
          Enter user-name:
          else delete the oracle 10g path from environment variables and set the path for oracle 11g

          like: D:\......\oracle\product\11.2.0\dbhome_1\bin;
          • 2. Re: wrong version of sqlplus is opening
            Sunny kichloo
            Try to set your PATH environment variables with correct value of sqlplus bin utility.

            Refer this link.Error mentioned in below link is different But PATH setting is mentioned here

            sqlplus: not found oracle 11g
            • 3. Re: wrong version of sqlplus is opening
              Maahjoor
              hi,
              i do the same as you said,

              but result is the same, no change.
              my path variable is below
              C:\Program Files\Java\jdk1.7.0_15\bin;
              C:\DevSuiteHome_1\jdk\jre\bin\classic;
              C:\DevSuiteHome_1\jdk\jre\bin;
              C:\DevSuiteHome_1\jdk\jre\bin\client;
              C:\DevSuiteHome_1\jlib;
              C:\DevSuiteHome_1\bin;
              C:\DevSuiteHome_1\jre\1.4.2\bin\client;
              C:\DevSuiteHome_1\jre\1.4.2\bin;
              C:\app\Administrator\product\11.2.0\dbhome_1
              ;%SystemRoot%\system32;%SystemRoot%;
              %SystemRoot%\System32\Wbem;
              C:\Program Files (x86)\Intel\Services\IPT\;
              %systemroot%\System32\WindowsPowerShell\v1.0\;
              %systemroot%\System32\WindowsPowerShell\v1.0\;
              C:\app\Administrator\product\11.2.0\dbhome_1\bin;
              kindly guide me.
              • 4. Re: wrong version of sqlplus is opening
                Maahjoor
                hi,
                thanks,

                i check the link but it was linux related.
                instead i try to update my path variable like below
                $ORACLE_HOME/bin;
                but still not working.
                if i am wrong , kindly correct me.

                Regards
                • 5. Re: wrong version of sqlplus is opening
                  John Stegeman
                  I'd be willing to bet 2 cents that there is a sqlplus.exe in C:\DevSuiteHome_1\bin;
                  • 6. Re: wrong version of sqlplus is opening
                    Maahjoor
                    well done john!!

                    great show, i am surprised why not i think that!!

                    i just remove that line C:\DevSuiteHome_1\bin; from path variable.
                    you did great john, i was really stucked since i was going to un-install and re-install APEX, and
                    for that i was compelled to got to the apx directory and run sqlplus from there.

                    you just make me happy.
                    thank you so much john.
                    • 7. Re: wrong version of sqlplus is opening
                      EdStevens
                      Maahjoor wrote:
                      hi,
                      thanks,

                      i check the link but it was linux related.
                      instead i try to update my path variable like below
                      $ORACLE_HOME/bin;
                      but still not working.
                      if i am wrong , kindly correct me.

                      Regards
                      I see you already have the solution, but as an aside, you need to realize that the "$variable_name" syntax is for unix. The shell processor take the "$" as a delimiter indicating that the string that follows is the name of an environment variable, and the processor is to substitute the value of that variable. In Windows (which is where you are) the equivalent syntax is %variable_name%.