3

Can anyone please tell me how to solve this problem?

Sqlplus not recognized as an internal or external command operable program or batch file

enter image description here

2
  • 4
    Maybe install sqlplus? Commented Feb 28, 2021 at 9:52
  • The result of echo %ORACLE_HOME% looks wrong. Commented Feb 28, 2021 at 13:03

1 Answer 1

3

There are quite a lot of reasons why you can't run SQL*Plus. Let me say a few words, see if anything of that helps.

  • if you installed Oracle database (such as XE) on your computer, you'll have SQL*Plus as it comes by default with every Oracle database server installation

  • if you don't have Oracle database on your computer, you could have installed Oracle client software. There are various options available (full or instant client), and you can pick which part of the client you want to install. For example, SQL Loader, and/or export/import utilities, and/or SQL*Plus

  • if you already did something of above mentioned things, then directory (which contains SQL*Plus) isn't part of the PATH environment variable. Installer does that for you, but if you modified the PATH and accidentally removed the directory from it, then add it. For example, for my 11gXE installation, it is located in

    C:\oraclexe\app\oracle\product\11.2.0\server\bin
    
    • alternatively, if you don't want to add it to PATH (can't think of any reason why not), change current directory to it and then run SQL*Plus:

      c:\Temp>cd C:\oraclexe\app\oracle\product\11.2.0\server\bin
      
      C:\oraclexe\app\oracle\product\11.2.0\server\bin>sqlplus
      
      SQL*Plus: Release 11.2.0.2.0 Production on Ned Vel 28 11:13:07 2021
      <snip>
      
  • furthermore, looking at what your screenshot shows, there's no ORACLE_HOME on your computer; there is, on mine:

    c:\Temp>echo %oracle_home%
    C:\oraclexe\app\oracle\product\11.2.0\server
    

I hope it'll get you started.

Sign up to request clarification or add additional context in comments.

1 Comment

I always forget on Windows, but if the DB was just installed, maybe the cmd windows needs to be killed & reopened to pick up the environment. If Instant Client is chosen (and I'd recommend this if the alternative is the full client), then you can get it from oracle.com/database/technologies/instant-client/downloads.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.